Esempio n. 1
0
 public void OnPlayerLeftRoom(Player otherPlayer)
 {
     if (PlayerLeftRoom != null)
     {
         PlayerLeftRoom.Invoke(this, otherPlayer);
     }
 }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
 public void OnPlayerLeftRoom(Player _player)
 {
     PlayerLeftRoom?.Invoke(_player);
 }
Esempio n. 4
0
 internal void OnPlayerLeftRoom(Player other)
 {
     PlayerLeftRoom?.Invoke(other);
 }