2026-06-01 데드존 만들기 진행중
This commit is contained in:
14
Assets/02_Scripts/Zone/DeadZone.cs
Normal file
14
Assets/02_Scripts/Zone/DeadZone.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DeadZone : MonoBehaviour
|
||||
{
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if(other.GetComponentInParent<PlayerController>() != null)
|
||||
{
|
||||
PlayerController p = other.GetComponentInParent<PlayerController>();
|
||||
|
||||
p.TakeDamage(9999999);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/Zone/DeadZone.cs.meta
Normal file
2
Assets/02_Scripts/Zone/DeadZone.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f04acdf6d5c2075499cc53d22714d058
|
||||
Reference in New Issue
Block a user