private void HandleCombatOutcomeChanged(CombatOutcome outcome) { switch (outcome) { case CombatOutcome.None: _outcomeDisplayString.Value = string.Empty; break; case CombatOutcome.EnemyReachedBase: _outcomeDisplayString.Value = "the enemy reached your base"; break; case CombatOutcome.NoMoreLives: _outcomeDisplayString.Value = "no more lives"; break; default: throw new ArgumentOutOfRangeException(nameof(outcome), outcome, null); } }
private static IUnitCombat StubCombat(IUnit attacker, IUnit defender, CombatOutcome fixedOutcome) { var stubCombat = A.Fake<IUnitCombat>(); A.CallTo(() => stubCombat.CombatOutcome(A<IUnit>.That.Matches(unit => unit.Id == attacker.Id), A<IUnit>.That.Matches(unit => unit.Id == defender.Id))) .Returns(fixedOutcome); return stubCombat; }
public CombatLogEntry() { CombatEffect = new CombatOutcome(); }
private void EndGame(CombatOutcome outcome) { _sessionModel.Outcome.Value = outcome; ChangeState(CombatState.GameOver); DOVirtual.DelayedCall(2f, () => ChangeState(CombatState.AfterCombatScreen)); }
public CombatResult(CombatOutcome outc, string msg) { Message = msg; Outcome = outc; }