Esempio n. 1
0
 public void Initialize(char color, char note_type, int start_time, NoteDataObject last_note)
 {
     mColor        = color;
     mNoteType     = note_type;
     mStartingTime = start_time;
     mLastNote     = last_note;
 }
 // Update is called once per frame
 void Update()
 {
     foreach (Queue <NoteDataObject> lane in mNotesToSpawn.Values)
     {
         if (lane.Count > 0)
         {
             if (mKoreo.GetLatestSampleTime() + mNoteToHitTravelTime >= lane.Peek().GetStartTime())
             {
                 NoteDataObject spawnedNote = lane.Dequeue();
                 spawnNote(spawnedNote.GetColor(), 1, spawnedNote.GetStartTime());   //hard coded speed for now. Will later depend on difficulty
             }
         }
     }
 }
    private void InitializeNotes()
    {
        List <KoreographyEvent> rawEvents = mKoreo.GetTrackByID("FurEliseRhythmEASY").GetAllEvents();

        foreach (KoreographyEvent kevent in rawEvents)
        {
            if (kevent.HasTextPayload())
            {
                char[] payload = kevent.GetTextValue().ToCharArray();

                NoteDataObject newNote = new NoteDataObject();

                if (payload[0].Equals('N'))
                {
                    //payload[1] == color
                    newNote.Initialize(payload[1], payload[0], kevent.StartSample);
                }


                mNotesToSpawn[payload[1]].Enqueue(newNote);
            }
        }
    }