Beispiel #1
0
        private void InitializeNote()
        {
            var eventSettings = new BeatEvent();

            eventSettings.onUpdate = OnUpdateNote;

            m_Note.Initialize(m_NoteBufferSize, eventSettings);
        }
Beispiel #2
0
        private void InitializeRhythm()
        {
            var eventSettings = new BeatEvent();

            eventSettings.onUpdate = DrawRhythmLine;

            m_Rhythm.Initialize(m_RhythmBufferSize, eventSettings);
        }
Beispiel #3
0
		private void InitializeNote()
		{
			if (m_NotePool == null)
			{
				m_NotePool = ImagePool.Create(m_NoteBufferSize, m_NotePrefab);
			}
			if (m_NoteBeat == null)
			{
				m_NoteBeat = new BeatManager();
				var eventSettings = new BeatEvent();
				eventSettings.onStart = OnStartNote;
				eventSettings.onUpdate = OnUpdateNote;
				eventSettings.onStop = OnStopNote;
				m_NoteBeat.Initialize(m_NoteBufferSize, eventSettings);
			}
		}
Beispiel #4
0
		private void InitializeTempoLine()
		{
			if (m_TempoLinePool == null)
			{
				m_TempoLinePool = TempoLinePool.Create(m_RhythmBufferSize, m_TempoLinePrefab);
			}
			if (m_TempoLineBeat == null)
			{
				m_TempoLineBeat = new BeatManager();
				var eventSettings = new BeatEvent();
				eventSettings.onStart = OnStartTempoLine;
				eventSettings.onUpdate = OnUpdateTempoLine;
				eventSettings.onStop = OnStopTempoLine;
				m_TempoLineBeat.Initialize(m_RhythmBufferSize, eventSettings);
			}
		}
Beispiel #5
0
 //-----------------------------------
 // Method (public)
 //-----------------------------------
 public void Initialize(int size, BeatEvent eventSettings)
 {
     m_Pool          = new ObjectPool <Beat>(size);
     m_Actives       = new List <Beat>(size);
     m_EventSettings = eventSettings;
 }