1
0
This repository has been archived on 2024-09-03. You can view files and clone it, but cannot push or open issues or pull requests.
System-Purge/Assets/Resources/Scripts/OnCollision.cs

18 lines
279 B
C#

using UnityEngine;
using System.Collections;
public class OnCollision : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.name == "Player")
{
print("Ow!");
// player is damaged
}
}
}