Notes now move

This commit is contained in:
Thastertyn committed 2024-06-16 22:07:02 +02:00
1 parent e1dbbafe99
commit 27082a717c
4 files changed
+19 -12

No files matched your search

+9 -4
View File
@@ -51,11 +51,16 @@ public class Game : MonoBehaviour
float timestamp = manager.source.time;
List<Note> newNotes = allNotes.Where(note => note.t >= timestamp && timestamp + 1f <= note.t).ToList();
newNotes.ForEach(note => activeNotes.Remove(note));
foreach (Note note in newNotes)
{
Debug.Log("Removing note");
Debug.Log(allNotes.Remove(note));
}
menu.GameElem.CheckNoteSelf(timestamp);
menu.GameElem.UpdateMargin(timestamp);
menu.GameElem.UpdateNotes(newNotes);
menu.GameElem.CheckNoteLifetime(timestamp);
menu.GameElem.UpdateMargin(timestamp);
}
IEnumerator GameLoop()
@@ -83,7 +88,7 @@ public class Game : MonoBehaviour
{
int totalSeconds = (int)manager.source.time;
int h = totalSeconds / 3600;
int m = (totalSeconds % 3600) / 60;
int m = totalSeconds % 3600 / 60;
int s = totalSeconds % 60;
string result = $"{h:D2}:{m:D2}:{s:D2} / {totalDuration}";