File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,11 +32,22 @@ public partial class BattleDirector : Node2D
3232
3333 private SongData _curSong ;
3434
35+ [ Export ]
36+ private NoteQueue NQ ;
37+
3538 #endregion
3639
3740 #region Note Handling
3841 private void PlayerAddNote ( ArrowType type , int beat )
3942 {
43+ //TODO: note that should be added from the queue
44+ Note note = NQ . GetCurrentNote ( ) ;
45+ if ( note == null )
46+ {
47+ GD . Print ( "No notes in queue" ) ;
48+ return ;
49+ }
50+
4051 GD . Print ( $ "Player trying to place { type } typed note at beat: " + beat ) ;
4152 if ( ! NotePlacementBar . CanPlaceNote ( ) )
4253 return ;
Original file line number Diff line number Diff line change @@ -85,13 +85,17 @@ public Note GetCurrentNote()
8585 {
8686 if ( _noteQueue . Count > 0 )
8787 {
88- Note currentNote = _noteQueue . Dequeue ( ) ;
89- UpdateQueue ( ) ;
90- return currentNote ;
88+ return _noteQueue . Peek ( ) ;
9189 }
9290 return null ;
9391 }
9492
93+ public void DequeueNote ( )
94+ {
95+ _noteQueue . Dequeue ( ) ;
96+ UpdateQueue ( ) ;
97+ }
98+
9599 // Updates the queue's graphics
96100 private void UpdateQueue ( )
97101 {
@@ -131,6 +135,5 @@ public void ScrambleQueue()
131135 _noteQueue = new Queue < Note > ( tempList ) ;
132136 }
133137
134- //TODO: should work, in order to run in game use
135- // noteQueueInstance.AddNoteToQueue("single");
138+ //TODO: MAYBE? implement saving the notequeue to savedata
136139}
You can’t perform that action at this time.
0 commit comments