Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        this.ContinueButton.onClick.AddListener(() => {
            GameScenes.SwitchToBattleResultSceneAndProcessCombatResults(CombatResult.VICTORY);
        });

        Hide();
    }
    public static void CheckIsBattleOverAndIfSoSwitchScenes()
    {
        var          isVictoryBecauseAllEnemiesDead = GameState.Instance.EnemyUnitsInBattle.All(item => item.IsDead);
        var          isDefeatBecauseTpk             = GameState.Instance.AllyUnitsInBattle.All(item => item.IsDead);
        CombatResult combatResult = null;

        if (isVictoryBecauseAllEnemiesDead)
        {
            combatResult = (CombatResult.VICTORY);
        }
        if (isDefeatBecauseTpk)
        {
            combatResult = (CombatResult.TPK);
        }

        if (combatResult != null)
        {
            GameScenes.SwitchToBattleResultSceneAndProcessCombatResults(combatResult);
        }
    }
Beispiel #3
0
 public void FleeCombat()
 {
     GameScenes.SwitchToBattleResultSceneAndProcessCombatResults(CombatResult.FLED);
 }