private int m_NumOfRow = 0; // number of row and is a an int. void OnEnable() { m_Song = (SongChart)target; // (Explicit casting)casting m_Song // for(int i = 0; i < m_Song.ListOfRows.Count; i++) // { // for(int j = 0 ; j < m_Song.NumOfCol; j++) // { // // m_Song.ListOfRows[i].RowOfNote.Add(false); // } // } }
private void Initialize() { //m_Song = Resources.Load<SongChart> (m_FilePath); m_Song = SongData.Instance.SelectSong; if (m_Song == null) { Debug.LogError("NO SONG FOUNG DUMMY! "); return; } m_SongTimer = new Timer(m_Song.Time * 60.0f); m_TimeStep = (m_Song.Time * 60.0f) / m_Song.GetRows.Count; m_CurrentRow = 0; m_TargetDistance = Vector3.Distance(m_Spawners[0].transform.position, m_Target.position); SetUpKeys(); }
} // create a getter from the songChart public void SongFilePath(string m_SongFilePath) // songname from the seleted song button { m_SelectSong = Resources.Load <SongChart> (m_SongFilePath); // Find in the path in the Resources folder }