示例#1
0
        // STARTING A GAME

        /// Look for a suitable partner to play the game with
        public virtual void StartMatchMaking(string level, IRoomListener room = null)
        {
            uint gameVariation = (uint)Maps.GetIndex(level);

            UILogger.Log("index: " + gameVariation);

            this.roomListener = room;

            startedMatching = true;
            ShowMPStatus("Connecting...");
            PlayGamesPlatform.Instance.RealTime.CreateQuickGame(minimumPartners, maximumPartners, gameVariation, this);
        }
示例#2
0
        public SingleRoomManager(ServerRoomFactory roomFactory, RoomEventDispatcher dispatcher, bool tokenOnce, IRoomListener roomListener)
        {
            _dispatcher              = dispatcher;
            _dispatcher.OnRoomEvent += OnRoomEvent;
            _playerInfoManager       = new PlayerInfoManager(tokenOnce);

            _roomFactory = roomFactory;
            roomFactory.TokenGenerator = _playerInfoManager;

            _roomListener = roomListener;

            _debugSystem = new ServerDebugInfoSystem(this);
        }
示例#3
0
        // STARTING A GAME

        /// Look for a suitable partner to play the game with
        public override void StartMatchMaking(string level, IRoomListener room = null)
        {
            uint gameVariation = (uint)Maps.GetIndex(level);

            UILogger.Log("index: " + gameVariation);

            this.roomListener = room;

            startedMatching = true;
            ShowMPStatus("Connecting...");

            // start a matchmaking game right here
            OnRoomConnected(true);
        }
示例#4
0
        //private Stopwatch _stopwatch;

        public SingleRoomManager(ServerRoomFactory roomFactory, RoomEventDispatcher dispatcher, IRoomListener roomListener) : this(roomFactory, dispatcher, false, roomListener)
        {
        }
 public void Setup()
 {
     _roomListener = new RoomListener(new HipChatProxy(new HipChatConnectionFactory(new HipChatConnectionSettings(apiUrl, apiKey)), new HipChatApiExecutor()));
     _roomListener.GetHipChatProxy().MessageRoom("52403", "api", "Room Listener Test Message");
 }
示例#6
0
 public void removeRoomListener(IRoomListener listener)
 {
     roomListeners.Remove(listener);
 }
示例#7
0
 public void addRoomListener(IRoomListener listener)
 {
     roomListeners.Add(listener);
 }