C# Class AngryTanks.Client.Player

Inheritance: DynamicSprite, IDisposable
Datei anzeigen Open project: dvicory/AngryTanks Class Usage Examples

Protected Properties

Property Type Description
playerInfo PlayerInformation
shots Shot>.Dictionary
state PlayerState

Public Methods

Method Description
Die ( Player killer ) : void
Dispose ( ) : void
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
DrawCallsign ( GameTime gameTime, SpriteBatch spriteBatch ) : void

Draws the callsign behind the Player.

Player ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : System
Spawn ( Vector2 position, System.Single rotation ) : void
Update ( GameTime gameTime ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void
GetTankSize ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : Vector2
GetTexture ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : Microsoft.Xna.Framework.Graphics.Texture2D
HandleReceivedMessage ( object sender, AngryTanks.Client.ServerLinkMessageEvent message ) : void
Shoot ( Byte shotSlot, Vector2 initialPosition, System.Single rotation, Vector2 initialVelocity, bool local ) : void
Shoot ( Byte shotSlot, bool local ) : void

Method Details

Die() public method

public Die ( Player killer ) : void
killer Player
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Draw() public method

public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

DrawCallsign() public method

Draws the callsign behind the Player.
public DrawCallsign ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

GetTankSize() protected static method

protected static GetTankSize ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : Vector2
world AngryTanks.Client.World
playerInfo PlayerInformation
return Vector2

GetTexture() protected static method

protected static GetTexture ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : Microsoft.Xna.Framework.Graphics.Texture2D
world AngryTanks.Client.World
playerInfo PlayerInformation
return Microsoft.Xna.Framework.Graphics.Texture2D

HandleReceivedMessage() protected method

protected HandleReceivedMessage ( object sender, AngryTanks.Client.ServerLinkMessageEvent message ) : void
sender object
message AngryTanks.Client.ServerLinkMessageEvent
return void

Player() public method

public Player ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : System
world AngryTanks.Client.World
playerInfo PlayerInformation
return System

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

Shoot() protected method

protected Shoot ( Byte shotSlot, bool local ) : void
shotSlot Byte
local bool
return void

Spawn() public method

public Spawn ( Vector2 position, System.Single rotation ) : void
position Vector2
rotation System.Single
return void

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Property Details

playerInfo protected_oe property

protected PlayerInformation playerInfo
return PlayerInformation

shots protected_oe property

protected Dictionary shots
return Shot>.Dictionary

state protected_oe property

protected PlayerState state
return PlayerState