예제 #1
0
        public void OnStart(ResponseGameInfo gameInfo, ResponseData data, ResponseObservation observation, uint playerId)
        {
            if (realTime)
            {
                sw = new Stopwatch();
                sw.Start();
            }
            GameInfo          = gameInfo;
            Data              = data;
            Observation       = observation;
            PlayerId          = (int)playerId - 1;
            OppenentsPlayerId = PlayerId == 1 ? 0 : 1;
            Race              = GameInfo.PlayerInfo[PlayerId].RaceActual;
            OpponentsRace     = GameInfo.PlayerInfo[OppenentsPlayerId].RaceActual;
            Units.LoadData();
            StateManager = new StateManager();
            StateManager.OnFrame();

            Map = new MapAnalyser();
            Map.Analyse(this);
            Build = new RoachAllIn();
            if (test)
            {
                Build = new Testzerg();
            }
            Build.OnStart();

            TaskManager = new TaskManager();
        }