Exemple #1
0
        public void RunPlayerTest()
        {
            Log.d(">>  Starting a Planning Phase.  <<");

            var end = new Action(() => { Log.d(">>   End of a Planning Phase.   <<"); });

            if (_playerBotData == null)
            {
                _playerBotData = ScriptableObject.CreateInstance <MyBotData>();
            }

            var battleStage = new Action(() =>
            {
                Log.d(this, "Starting Battle Stage");
                if (_playerBattleTest == null)
                {
                    _playerBattleTest = ScriptableObject.CreateInstance <BattleTest>();
                }
                _playerBattleTest.MyBotData = _playerBotData;
                _playerBattleTest.BattleStage(end);
            });

            var buildingStage = new Action(() =>
            {
                Log.d(this, "Starting Building Stage");
                if (_playerBuildingTest == null)
                {
                    _playerBuildingTest = ScriptableObject.CreateInstance <BuildingTest>();
                }
                _playerBuildingTest.MyBotData = _playerBotData;
                _playerBuildingTest.BuildingStage(battleStage);
            });

            var economyStage = new Action(() =>
            {
                if (_playerEconomyTest == null)
                {
                    _playerEconomyTest = ScriptableObject.CreateInstance <EconomyTest>();
                }
                _playerEconomyTest.MyBotData = _playerBotData;
                _playerEconomyTest.EconomyStage(buildingStage);
            });

            economyStage();
        }
Exemple #2
0
 bool Battle(BattleTest battle, NextStageStarter startNextStage)
 {
     battle.BattleStage(startNextStage);
     return(true);
 }