15 lines
421 B
C#
15 lines
421 B
C#
using UnityEngine;
|
|
|
|
namespace FastArena
|
|
{
|
|
public class DeathZone : MonoBehaviour
|
|
{
|
|
private void OnCollisionEnter(Collision collision)
|
|
{
|
|
//Debug.Log(collision.gameObject.name);
|
|
var mortal = collision.gameObject.GetComponentInParent<Mortal>();
|
|
if (mortal != null) mortal.Kill();
|
|
//else Destroy(collision.gameObject);
|
|
}
|
|
}
|
|
} |