private void LevelComplete() { levelState = LevelState.GameNotActive; TouchController.instance.Deactivate(); UIController.instance.ShowLevelCompletedPanel(); currentLevel++; if (currentLevel > LevelController.instance.LevelsAmount) { currentLevel = 1; } GameSettingsPrefs.Set("current level", currentLevel); Tween.DelayedCall(2f, StartGame); }
public static void OnObstacleAbsorbed() { if (instance.levelState == LevelState.First || instance.levelState == LevelState.Second) { instance.levelState = LevelState.GameNotActive; TouchController.instance.Deactivate(); CameraController.instance.ShakeCamera(); if (!instance.reviveUsed) { Tween.DelayedCall(1f, instance.GameOver); } else { Tween.DelayedCall(1f, instance.StartGame); } } }
private void OnEnable() { Tween.DelayedCall(delay, () => gameObject.SetActive(false)); }