C# Class MyGame.PlayerUnit

This class represent player unit which moves in a speficied direction, rotates , take damange and die when hp reaches zero
Inheritance: Unit
Show file Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Public Properties

Property Type Description
health int

Public Methods

Method Description
PlayerUnit ( MyGame game, Vector3 Position, Vector3 Rotation, Vector3 Scale ) : System
decreaseHealth ( int decreasedHealth ) : void
update ( GameTime gameTime ) : void

Allows the unit to update itself.

Method Details

PlayerUnit() public method

public PlayerUnit ( MyGame game, Vector3 Position, Vector3 Rotation, Vector3 Scale ) : System
game MyGame
Position Vector3
Rotation Vector3
Scale Vector3
return System

decreaseHealth() public method

public decreaseHealth ( int decreasedHealth ) : void
decreasedHealth int
return void

update() public method

Allows the unit to update itself.
public update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void

Property Details

health public property

public int health
return int