Example #1
0
    public static GameObject CreateNotesObject(GameObject notesPrefab, NotesData notesData)
    {
        GameObject     obj   = Instantiate <GameObject>(notesPrefab);
        NotesBehaviour notes = obj.GetComponent <NotesBehaviour>();

        notes.NotesData = notesData;
        return(obj);
    }
Example #2
0
    void CreateNextNotes()
    {
        float currentTime = Time.time - startTime;

        foreach (var channel in channels)
        {
            while (channel.Count > 0 && channel.Peek().Time + timeOffsetToCreate < currentTime)
            {
                NotesBehaviour.CreateNotesObject(notes, channel.Dequeue());
            }
        }
    }