다이얼로그 일단 다 넣고 다 넣긴함 오류 수정 해아함
This commit is contained in:
23
Assets/02_Scripts/Story/KimchiHitZone.cs
Normal file
23
Assets/02_Scripts/Story/KimchiHitZone.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class KimchiHitZone : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private UnityEvent onKimchiHit;
|
||||
|
||||
private bool hasBeenHit;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (hasBeenHit)
|
||||
return;
|
||||
|
||||
if (!other.CompareTag("Kimchi"))
|
||||
return;
|
||||
|
||||
hasBeenHit = true;
|
||||
onKimchiHit?.Invoke();
|
||||
|
||||
Debug.Log("김치싸대기 성공!");
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/Story/KimchiHitZone.cs.meta
Normal file
2
Assets/02_Scripts/Story/KimchiHitZone.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f38e3e49c2637c84f9681eddb0eb1a47
|
||||
Reference in New Issue
Block a user