コード例 #1
0
ファイル: GameTestRunner.cs プロジェクト: kyapp69/XposeCraft
        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();
        }
コード例 #2
0
 bool Economy(EconomyTest economy, NextStageStarter startNextStage)
 {
     economy.EconomyStage(startNextStage);
     return(true);
 }