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

        Hide();
    }
Ejemplo n.º 2
0
    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);
        }
    }
Ejemplo n.º 3
0
 public void FleeCombat()
 {
     GameScenes.SwitchToBattleResultSceneAndProcessCombatResults(CombatResult.FLED);
 }