// 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); }
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); }
// 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); }
//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"); }
public void removeRoomListener(IRoomListener listener) { roomListeners.Remove(listener); }
public void addRoomListener(IRoomListener listener) { roomListeners.Add(listener); }