// Update is called once per frame void Update() { double _localCurrentOffset = GameManager.Instance.timer * 1000f; if (ScoreManager.Instance.InHitWindow(currentNote, _localCurrentOffset)) { if (Input.GetKeyDown(keyCode)) { ScoreManager.Instance.ScoreNote(currentNote, ScoreManager.Instance.GetHitScore(currentNote, _localCurrentOffset), currentNote.getPlayMode() == 1 ? ScoreManager.Instance.MEMORYBASESCORE : ScoreManager.Instance.INVERTEDMEMORYBASESCORE); MemoryNoteManager.Instance.NoteHit(); Destroy(gameObject); } } else if (ScoreManager.Instance.MissedHitWindow(currentNote, _localCurrentOffset) && !finished) { MemoryNoteManager.Instance.NoteMissed(); ScoreManager.Instance.ScoreNote(currentNote, ScoreManager.Instance.MISS, currentNote.getPlayMode() == 1 ? ScoreManager.Instance.MEMORYBASESCORE : ScoreManager.Instance.INVERTEDMEMORYBASESCORE); finished = true; } }