Exemplo n.º 1
0
    public void ShowPanel(LevelEndCondition endCondition)
    {
        LevelSceneManager.GameIsActive = false;

        int maxLevel = LevelEditorDataManager.Instance.GetLevelsDictionary().Last().Key;

        switch (endCondition)
        {
        case LevelEndCondition.LevelComplete:
            LevelEndPanelText.key = CompleteKey;
            if (currentLevel != maxLevel)
            {
                NextLevelButton.SetActive(true);
            }
            sfxManager.PlayClip(sfxManager.LevelComplete);
            break;

        case LevelEndCondition.LevelFailed:
            LevelEndPanelText.key = FailKey;
            RetryButton.SetActive(true);
            sfxManager.PlayClip(sfxManager.LevelFailed);
            break;
        }
        LevelEndPanel.SetActive(true);
    }
Exemplo n.º 2
0
    public void ChangeLevelEndCondition(LevelEndCondition newCondition)
    {
        if (CurrentEndCondition == newCondition)
        {
            return;
        }

        CurrentEndCondition = newCondition;
        if (levelEndConditionChange != null)
        {
            levelEndConditionChange(CurrentEndCondition);
        }
    }
Exemplo n.º 3
0
    public void ShowPanel(LevelEndCondition endCondition, int level)
    {
        currentLevel = level;

        ShowPanel(endCondition);
    }
Exemplo n.º 4
0
 public void PrepareLevel(LevelEndCondition endCondition)
 {
     GridTile_StaticAnomaly.anomalySpawned = false;
     CurrentEndCondition = endCondition;
     ChangeLevelTime(LevelTime.Level);
 }
Exemplo n.º 5
0
 private void OnLevelConditionChange(LevelEndCondition condition)
 {
     StartTime();
 }