mirror of
https://github.com/ConjureETS/Labo_2_equ_2_a15.git
synced 2026-03-24 01:21:07 +00:00
14 lines
288 B
C#
14 lines
288 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class CollisionCheck : MonoBehaviour {
|
|
|
|
void OnCollisionEnter2D(Collision2D col)
|
|
{
|
|
if(col.gameObject.name == "Enemy")
|
|
{
|
|
Debug.Log(gameObject.GetComponent<Health>().removeHP(1));
|
|
}
|
|
}
|
|
}
|