protected virtual void OnBattleOver() { BattleEventArgs args = new BattleEventArgs(); args.thisBattle = this; BattleOver?.Invoke(this, args); }
public async void OnWin() { Result = GameResult.GetNewVictory(); BattleOver?.Invoke(Result); await WaitAnimations(onWinAnimations); BattleResultShown?.Invoke(Result); }
void InitializeStates() { IState introState = new BattleIntro(gameObject); IState selectActionState = new BattleSelectAction(gameObject); IState selectTargetState = new BattleSelectTarget(gameObject); IState performMoveState = new BattlePerformMove(gameObject); IState swapState = new BattleSwap(gameObject); IState gameOverState = new BattleOver(gameObject); IState waveIncreaseState = new BattleIncreaseWave(gameObject); statemachine.AddState("Intro", introState); statemachine.AddState("SelectAction", selectActionState); statemachine.AddState("SelectTarget", selectTargetState); statemachine.AddState("PerformMove", performMoveState); statemachine.AddState("Swap", swapState); statemachine.AddState("GameOver", gameOverState); statemachine.AddState("WaveIncrease", waveIncreaseState); statemachine.ChangeState("Intro"); }
public void OnBattleOverTrigger(PartyController partyController) { BattleOver?.Invoke(partyController); }
public void OnLose() { Result = GameResult.GetNewLoss(); BattleOver?.Invoke(Result); }