Beispiel #1
0
    public LevelMusicData FindLevelData(E_Level p_level)
    {
        foreach (var levelData in levelMusicData)
        {
            if (levelData.level == p_level)
            {
                return(levelData);
            }
        }

        return(null);
    }
Beispiel #2
0
    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;
    }
Beispiel #3
0
    protected void Awake()
    {
        currentLevel = E_Level.None;

        if (instance != null)
        {
            GameObject.Destroy(this);
            return;
        }
        else
        {
            instance = this;
            GameObject.DontDestroyOnLoad(this);
        }
    }