コード例 #1
0
        public void BeginGame()
        {
            NWGameCommand com = new NWGameCommand();

            com.GameCommandType = GameCommandType.GameReady;
            gameControllers.ServerSimulator.AddCommand(com);
        }
コード例 #2
0
        public void WaitStartValues()
        {
            NWGameCommand com = new NWGameCommand();

            com.GameCommandType = GameCommandType.WaitStartValues;
            gameControllers.ServerSimulator.AddCommand(com);
        }
コード例 #3
0
 private void MainPlayerCommand(NWGameCommand _gameCommand)
 {
     if (_gameCommand != null)
     {
         gameControllers.ServerSimulator.AddCommand(_gameCommand);
     }
     else
     {
         Console.LogError(ConsoleFilter.MainController, "MainPlayer GameCommand is Null");
     }
 }
コード例 #4
0
        public void RemoveBuildObjRequest(int _buldId, int _idTask)
        {
            NWBuildTask task = new NWBuildTask();

            task.progress = 0.0f;
            task.Id       = _idTask;
            task.BuildId  = _buldId;

            NWGameCommand com = new NWGameCommand();

            com.GameCommandType = GameCommandType.RemoveBuildTask;
            com.BuildTasks      = new NWBuildTask[1] {
                task
            };

            gameControllers.ServerSimulator.AddCommand(com);
        }
コード例 #5
0
        public void CreateRobotRequest(int _buldId)
        {
            NWBuildTask task = new NWBuildTask();

            task.progress = 0.0f;
            task.Id       = 0;
            task.BuildId  = _buldId;

            NWGameCommand com = new NWGameCommand();

            com.GameCommandType = GameCommandType.AddBuildTask;
            com.BuildTasks      = new NWBuildTask[1] {
                task
            };

            gameControllers.ServerSimulator.AddCommand(com);
        }
コード例 #6
0
        public void CreateTurretRequest(int _buldId, int idPlatform, TurretType _turretType)
        {
            NWBuildTask task = new NWBuildTask();

            task.progress         = 0.0f;
            task.Id               = 0;
            task.BuildId          = _buldId;
            task.Type             = BuildTaskType.Turret;
            task.CreateTurretType = _turretType;
            task.PlatformId       = idPlatform;

            NWGameCommand com = new NWGameCommand();

            com.GameCommandType = GameCommandType.AddBuildTask;
            com.BuildTasks      = new NWBuildTask[1] {
                task
            };

            gameControllers.ServerSimulator.AddCommand(com);
        }