AngryTanks.Client.LocalPlayer.Shoot C# (CSharp) Method

Shoot() protected method

protected Shoot ( Byte shotSlot, Vector2 initialPosition, System.Single rotation, Vector2 initialVelocity, bool local ) : void
shotSlot Byte
initialPosition Vector2
rotation System.Single
initialVelocity Vector2
local bool
return void
        protected override void Shoot(Byte shotSlot, Vector2 initialPosition, Single rotation, Vector2 initialVelocity, bool local)
        {
            // send out the shot begin packet right away
            NetOutgoingMessage shotBeginMessage = World.ServerLink.CreateMessage();

            MsgBeginShotPacket shotBeginPacket = new MsgBeginShotPacket(shotSlot, initialPosition, rotation, initialVelocity);

            shotBeginMessage.Write((Byte)shotBeginPacket.MsgType);
            shotBeginPacket.Write(shotBeginMessage);

            World.ServerLink.SendMessage(shotBeginMessage, NetDeliveryMethod.ReliableUnordered, 0);

            base.Shoot(shotSlot, initialPosition, rotation, initialVelocity, local);
        }
    }