@@ -145,7 +145,7 @@ public class GameScene: SKScene, SKPhysicsContactDelegate {
145145
146146 public func prepareNoteForSpawn( note: String , octave: Int , length: Double ) {
147147
148- let noteWidth = 43.75
148+ let noteWidth = 50.00
149149 var noteHeight : Double
150150 var x : Double = 0
151151
@@ -155,21 +155,21 @@ public class GameScene: SKScene, SKPhysicsContactDelegate {
155155 //Based on the note we have, spawn it in at the correct x position
156156 switch note {
157157 case " C " :
158- x = noteWidth * - 8
159- case " D " :
160158 x = noteWidth * - 7
161- case " E " :
159+ case " D " :
162160 x = noteWidth * - 6
163- case " F " :
161+ case " E " :
164162 x = noteWidth * - 5
165- case " G " :
163+ case " F " :
166164 x = noteWidth * - 4
167- case " A " :
165+ case " G " :
168166 x = noteWidth * - 3
169- case " B " :
167+ case " A " :
170168 x = noteWidth * - 2
171- case " C2 " :
169+ case " B " :
172170 x = noteWidth * - 1
171+ case " C2 " :
172+ x = noteWidth * 0
173173 case " D2 " :
174174 x = noteWidth
175175 case " E2 " :
@@ -224,7 +224,7 @@ public class GameScene: SKScene, SKPhysicsContactDelegate {
224224 scene. addChild ( newNote)
225225
226226 //start moving down the screen
227- let move = SKAction . moveBy ( x: 0 , y: - 1500 , duration: 15 / 5 )
227+ let move = SKAction . moveBy ( x: 0 , y: - 1500 , duration: 15 / 3 )
228228 newNote. run ( move)
229229
230230 //to maintain performance, delete note nodes after they leave the screen.
@@ -320,7 +320,33 @@ public class GameScene: SKScene, SKPhysicsContactDelegate {
320320 //this function adds all the notes to the array within the Song class
321321 public func setupSong( ) {
322322 // .quarter = .25, half = .5, and so on; fix later
323- for _ in 0 ... 5 {
323+
324+ song. addNote ( note: " D " , octave: 1 , length: 0.25 )
325+ song. addDelay ( length: 0.5 )
326+ song. addNote ( note: " D " , octave: 1 , length: 0.25 )
327+ song. addDelay ( length: 0.5 )
328+ song. addNote ( note: " E " , octave: 1 , length: 0.25 )
329+ song. addDelay ( length: 0.5 )
330+ song. addNote ( note: " D " , octave: 1 , length: 0.25 )
331+ song. addDelay ( length: 0.5 )
332+ song. addNote ( note: " G " , octave: 1 , length: 0.25 )
333+ song. addDelay ( length: 0.5 )
334+ song. addNote ( note: " F " , octave: 1 , length: 0.5 )
335+ song. addDelay ( length: 0.5 )
336+ song. addNote ( note: " D " , octave: 1 , length: 0.25 )
337+ song. addDelay ( length: 0.5 )
338+ song. addNote ( note: " D " , octave: 1 , length: 0.25 )
339+ song. addDelay ( length: 0.5 )
340+ song. addNote ( note: " E " , octave: 1 , length: 0.25 )
341+ song. addDelay ( length: 0.5 )
342+ song. addNote ( note: " D " , octave: 1 , length: 0.25 )
343+ song. addDelay ( length: 0.5 )
344+ song. addNote ( note: " A " , octave: 1 , length: 0.25 )
345+ song. addDelay ( length: 0.5 )
346+ song. addNote ( note: " G " , octave: 1 , length: 0.5 )
347+ song. addDelay ( length: 0.5 )
348+
349+ /*for _ in 0...5 {
324350 song.addNote(note: "A", octave: 1, length: 0.25)
325351 song.addDelay(length: 0.25)
326352 song.addNote(note: "C", octave: 1, length: 0.5)
@@ -341,7 +367,7 @@ public class GameScene: SKScene, SKPhysicsContactDelegate {
341367 song.addDelay(length: 0.25)
342368 song.addNote(note: "F2", octave: 1, length: 0.25)
343369 song.addDelay(length: 0.25)
344- }
370+ }*/
345371 }
346372
347373 var i = - 1
0 commit comments