Exemple #1
0
        public override void Execute()
        {
            //display ready hero in UI, hero.execute will move them from ready when they have a command.

            foreach (var hero in stateMachine.heroesToCommand)
            {
                if (hero.IsReady())
                {
                    DefaultHero.TakingCommandsEvent(hero);
                    hero.Execute();
                    break;
                }
            }

            if (stateMachine.heroesToCommand.All(hero => !hero.IsReady()))
            {
                stateMachine.ChangeState(typeof(BattleExecutePhase));
            }
        }