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); } }
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); } }