public void OnPlayerLeftRoom(Player otherPlayer) { if (PlayerLeftRoom != null) { PlayerLeftRoom.Invoke(this, otherPlayer); } }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns> room status if room is empty shut down the game</returns> private bool RemovePlayer(uint id) { var player = Players.Find(p => (p as PlayerEntity).Peer.Id == id); if (player == null) { return(false); } Players.Remove(player); SendMessageToAll(PlayerLeftRoom.GetOperation(id, this.Id), DeliveryMethod.Reliable); // todo: fire player count update FN.Logger.Info($"player left the room {id}"); return(true); }
public void OnPlayerLeftRoom(Player _player) { PlayerLeftRoom?.Invoke(_player); }
internal void OnPlayerLeftRoom(Player other) { PlayerLeftRoom?.Invoke(other); }