示例#1
0
 public void Start()
 {
     if (State == MatchState.Ready)
     {
         _broadcastHandler.BroadcastConfiguration(_mode.GetConfiguration());
         State = MatchState.Loading;
     }
 }
示例#2
0
文件: Game.cs 项目: pksorensen/CycleR
        public Game(IEnumerable<User> players, IGameMode mode, BroadcastHandler broadcastHandler, Action onFinish)
        {
            _mode = mode;
            _gameConfiguration = _mode.GetConfiguration();
            _broadcastHandler = broadcastHandler;
            _map = new Map(_gameConfiguration.MapConfig);

            var cycleDictionary = createCycles(players);

            _onFinish = onFinish;
            _cycleManager = new CycleManager(cycleDictionary);

            _map.RegisterCycles(cycleDictionary);
            _broadcastHandler.RegisterCycles(cycleDictionary);

            CommandHandler = new CommandHandler(cycleDictionary);
        }
示例#3
0
文件: Game.cs 项目: darocha/CycleR
        public Game(IEnumerable <User> players, IGameMode mode, BroadcastHandler broadcastHandler, Action onFinish)
        {
            _mode = mode;
            _gameConfiguration = _mode.GetConfiguration();
            _broadcastHandler  = broadcastHandler;
            _map = new Map(_gameConfiguration.MapConfig);

            var cycleDictionary = createCycles(players);


            _onFinish     = onFinish;
            _cycleManager = new CycleManager(cycleDictionary);

            _map.RegisterCycles(cycleDictionary);
            _broadcastHandler.RegisterCycles(cycleDictionary);

            CommandHandler = new CommandHandler(cycleDictionary);
        }