예제 #1
0
        public void Update()
        {
            float trackTime_beats = CalculateBeatsIntoTrack(Time.time);

            // Check with the Layout manager which blocks should spawn, and become activated. These blocks will be registered to listen for timer updates.
            foreach (BeatBlock blockToActivate in layoutTrack.GetBeatBlocksToSpawn(trackTime_beats))
            {
                blockToActivate.ActivateBeatBlock(this);    // The Beat block will register with us, since we are implementing a Master Timer!
            }

            // Update the active BeatBlocks.
            UpdateTime?.Invoke(trackTime_beats);
        }