Ejemplo n.º 1
0
 public void TransitionLevel()
 {
     victoryScreen.SetActive(false);
     _finishedLevel.TearDown();
     _nextLevel.Setup();
     _activeLevel = _nextLevel;
 }
Ejemplo n.º 2
0
    private void Start()
    {
        _gBallTrailRenderer = gBallPrefab.GetComponentInChildren <TrailRenderer>();

        for (int i = 0; i < levels.Count - 1; i++)
        {
            var levelIndex = i;
            levels[levelIndex].sceneCompleted += scene => LevelComplete(scene, levels[levelIndex + 1]);
        }

        _activeLevel = levels[startingLevel];//.FirstOrDefault();
        _activeLevel?.Setup();
    }
Ejemplo n.º 3
0
 private void LevelComplete(GravitonLevel finishedLevel, GravitonLevel nextLevel)
 {
     victoryScreen.SetActive(true);
     _finishedLevel = finishedLevel;
     _nextLevel     = nextLevel;
 }