Commit f3910b09 authored by 13정준영's avatar 13정준영

notehit

parent 1e35be9b
...@@ -28,9 +28,12 @@ abstract class Note ...@@ -28,9 +28,12 @@ abstract class Note
public abstract void Judge(double time); public abstract void Judge(double time);
// TODO: Refactort this
private static readonly float NOTE_SHOW_TIMING = 5;
private static readonly float NOTE_HIDE_TIMING = -2;
public void Update(float remainingTime) public void Update(float remainingTime)
{ {
if (remainingTime < -1 || remainingTime > 5) if (remainingTime < NOTE_HIDE_TIMING || remainingTime > NOTE_SHOW_TIMING)
{ {
noteObject.gameObject.SetActive(false); noteObject.gameObject.SetActive(false);
Active = false; Active = false;
...@@ -40,7 +43,8 @@ abstract class Note ...@@ -40,7 +43,8 @@ abstract class Note
Active = true; Active = true;
noteObject.gameObject.SetActive(true); noteObject.gameObject.SetActive(true);
} }
noteObject.SetPosition(remainingTime);
noteObject.SetPosition(remainingTime/NOTE_SHOW_TIMING);
} }
// factory method // factory method
......
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