public LevelMusicData FindLevelData(E_Level p_level) { foreach (var levelData in levelMusicData) { if (levelData.level == p_level) { return(levelData); } } return(null); }
private void ClearScene(E_Level p_NextLevel) { if (OnChangeLevel != null) { OnChangeLevel.Invoke(currentLevel, p_NextLevel); } if (OnChangeLevelOnce != null) { OnChangeLevelOnce.Invoke(currentLevel, p_NextLevel); OnChangeLevelOnce = null; } currentLevel = p_NextLevel; }
protected void Awake() { currentLevel = E_Level.None; if (instance != null) { GameObject.Destroy(this); return; } else { instance = this; GameObject.DontDestroyOnLoad(this); } }