Beispiel #1
0
        /// <summary>
        /// Handles a ball drop request from a client
        /// </summary>
        static public void Handle_CS_BallDrop(CS_BallDrop pkt, Player player)
        {   //Allow the arena to handle it
            if (player._arena == null)
            {
                Log.write(TLog.Error, "Handle_CS_BallDrop(): Player {0} sent update packet with no arena.", player);
                return;
            }

            if (player.IsSpectator)
            {
                Log.write(TLog.Warning, "Handle_CS_BallDrop(): Player {0} attempted to drop a ball from spec.", player);
                return;
            }

            player._arena.handleEvent(delegate(Arena arena)
            {
                if (arena == null)
                {
                    Log.write(TLog.Error, "Handle_CS_BallDrop(): Player {0} sent chat packet with no delegating arena.", player);
                    return;
                }

                player._arena.handleBallDrop(player, pkt);
            });
        }
Beispiel #2
0
 /// <summary>
 /// Triggered when a player requests to drop a ball
 /// </summary>
 public virtual void handleBallDrop(Player from, CS_BallDrop update)
 {
 }
Beispiel #3
0
 public bool playerBallDrop(Player player, Ball ball, CS_BallDrop drop)
 {
     return(true);
 }