/// <summary> /// Fires when client connected to room server /// </summary> protected virtual void OnClientConnectedToRoomServer() { logger.Info("We have successfully connected to the room server"); roomServerConnection.RemoveConnectionListener(OnClientConnectedToRoomServer); roomServerConnection.SendMessage((short)MstMessageCodes.ValidateRoomAccessRequest, roomServerAccessInfo.Token, (status, response) => { // If access denied if (status != ResponseStatus.Success) { logger.Error(response.AsString()); OnAccessDiniedEvent?.Invoke(); return; } // If access granted OnAccessGrantedEvent?.Invoke(); }); }
protected virtual void OnDestroy() { // Remove listener _connection.RemoveConnectionListener(OnConnectedToMaster); }
private void OnDestroy() { // Remove listener _connection.RemoveConnectionListener(OnConnectedToMaster); }