private void Fill(LevelResult levelResult) { level.text = (levelResult.level + 1).ToString(); bonus.text = levelResult.bonus.ToString(); extraLife.gameObject.SetActive(levelResult.bonus > 0); cartridges.text = $"THERE ARE {levelResult.nextLevel.cartridges} CARTRIDGES IN THIS LEVEL!"; }
private void GameController_OnLevelCompleted(object sender, LevelResult levelResult) { foreach (var level in levels.OrderBy(g => Guid.NewGuid())) { if (level.HasEntry(levelResult.exit, out var exit)) { currentLevel.gameObject.SetActive(false); currentLevel = level; level.gameObject.SetActive(true); SpawnLevel(currentLevel, exit, levelResult.nextLevel); break; } } }
private void GameController_OnLevelCompleted(object sender, LevelResult levelResult) { Fill(levelResult); Open(); }
private void GameController_OnLevelCompleted(object sender, LevelResult e) { scoreDisplayer.SetText(e.score); }