コード例 #1
0
        private IEnumerator GenerateAICommands()
        {
            if (Model.GamePhase == GamePhase.TeamPicking || Model.GamePhase == GamePhase.MissionVoting)
            {
                yield return(new WaitForSeconds(AiWaitSec));
            }
            List <BaseCommand> commands = new List <BaseCommand>();

            Model.Players.Where(player => !TakenId.Contains(player.Id)).ToList().
            ForEach(player => commands.Add(AIModel.TryGenerateAICommand(Model, player)));
            commands.RemoveAll(command => command == null);
            commands.ForEach(command => Model.AddCommand(command));
        }