Project
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Saw : MonoBehaviour
|
||||
{
|
||||
private void OnCollisionEnter2D(Collision2D col)
|
||||
{
|
||||
Player player;
|
||||
|
||||
if ((player = col.gameObject.GetComponent<Player>()) == true)
|
||||
{
|
||||
player.TakeDamage(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user