internal void DropHat(MatchPlayerHat hat, double x, double y, float velX = 0, float velY = 0)
 {
     if (this.DroppedHats.TryAdd(hat.Id, hat))
     {
         this.Clients.SendPacket(new AddHatOutgoingMessage(hat, x, y, velX, velY));
     }
     else
     {
         //Uhhh....
     }
 }
 internal void LoseHat(MatchPlayer player, double x, double y, float velX = 0, float velY = 0)
 {
     if (!player.Forfiet && player.FinishTime == null)
     {
         MatchPlayerHat hat = player.RemoveFirstHat();
         if (hat != null)
         {
             this.DropHat(hat, x, y, velX, velY);
             this.Clients.SendPacket(new SetPlayerHatsOutgoingMessage(player.SocketId, player.Hats));
         }
     }
 }
Example #3
0
 internal void AddHat(MatchPlayerHat hat) => this._Hats.Enqueue(hat);