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

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

            if (player.IsDead)
            {
                Log.write(TLog.Warning, "Handle_CS_BallPickup(): Player {0} attempted to pick up a ball while dead.", player);
                return;
            }

            //Let the arena handle it too
            player._arena.handleEvent(delegate(Arena arena)
            {
                player._arena.handleBallPickup(player, pkt);
            });
        }
Exemple #2
0
    {           // Member variables
        ///////////////////////////////////////////////////

        ///////////////////////////////////////////////////
        // Member Functions
        ///////////////////////////////////////////////////
        #region Update
        /// <summary>
        /// Triggered when a player requests to pick up a ball
        /// </summary>
        public virtual void handleBallPickup(Player from, CS_BallPickup update)
        {
        }