Commit 151cbb26 authored by catdog's avatar catdog

NoteHit을 사용하도록 수정

parent 8074cea8
...@@ -134,8 +134,9 @@ class ForwardNote : Note ...@@ -134,8 +134,9 @@ class ForwardNote : Note
{ {
if (Math.Abs(time - this.Time) < 0.5) if (Math.Abs(time - this.Time) < 0.5)
{ {
var obj = MonoBehaviour.Instantiate(PlayEngine.inst.explosion); noteObject.NoteHit(NoteHitType.PERFECT);
obj.transform.position = noteObject.transform.position; //var obj = MonoBehaviour.Instantiate(PlayEngine.inst.explosion);
//obj.transform.position = noteObject.transform.position;
} }
} }
} }
......
...@@ -45,8 +45,6 @@ public class ForwardNoteObject : NoteObject ...@@ -45,8 +45,6 @@ public class ForwardNoteObject : NoteObject
private void Start() private void Start()
{ {
NoteHit(NoteHitType.PERFECT);
Debug.Log("A");
} }
private void OnDisable() private void OnDisable()
......
...@@ -38,7 +38,7 @@ public abstract class NoteObject : MonoBehaviour ...@@ -38,7 +38,7 @@ public abstract class NoteObject : MonoBehaviour
{ {
OnNoteHit?.Invoke(type); OnNoteHit?.Invoke(type);
Instantiate(PlayEngine.inst.hitEffectPrefabs[(int)type], transform.position, Quaternion.identity); Instantiate(PlayEngine.inst.hitEffectPrefabs[(int)type], transform.position, Quaternion.identity);
Destroy(gameObject); //Destroy(gameObject);
} }
public virtual void SetPosition(float remainedTime) public virtual void SetPosition(float remainedTime)
......
...@@ -74,7 +74,6 @@ public class PlayEngine : SingletonBehaviour<PlayEngine> ...@@ -74,7 +74,6 @@ public class PlayEngine : SingletonBehaviour<PlayEngine>
AudioSource.PlayClipAtPoint(gunSfx, Vector3.zero); AudioSource.PlayClipAtPoint(gunSfx, Vector3.zero);
level.HandleInput(time); level.HandleInput(time);
} }
} }
if (Input.GetKeyDown(KeyCode.LeftArrow)) if (Input.GetKeyDown(KeyCode.LeftArrow))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment