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); }
public void ChangeLevelEndCondition(LevelEndCondition newCondition) { if (CurrentEndCondition == newCondition) { return; } CurrentEndCondition = newCondition; if (levelEndConditionChange != null) { levelEndConditionChange(CurrentEndCondition); } }
public void ShowPanel(LevelEndCondition endCondition, int level) { currentLevel = level; ShowPanel(endCondition); }
public void PrepareLevel(LevelEndCondition endCondition) { GridTile_StaticAnomaly.anomalySpawned = false; CurrentEndCondition = endCondition; ChangeLevelTime(LevelTime.Level); }
private void OnLevelConditionChange(LevelEndCondition condition) { StartTime(); }