15 lines
330 B
C#
15 lines
330 B
C#
using UnityEngine;
|
|
|
|
public class DeadZone : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
if(other.GetComponentInParent<PlayerController>() != null)
|
|
{
|
|
PlayerController p = other.GetComponentInParent<PlayerController>();
|
|
|
|
p.TakeDamage(9999999);
|
|
}
|
|
}
|
|
}
|