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
Afficher le fichier Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Méthodes publiques

Свойство Type Description
health int

Méthodes publiques

Méthode 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 méthode

public PlayerUnit ( MyGame game, Vector3 Position, Vector3 Rotation, Vector3 Scale ) : System
game MyGame
Position Vector3
Rotation Vector3
Scale Vector3
Résultat System

decreaseHealth() public méthode

public decreaseHealth ( int decreasedHealth ) : void
decreasedHealth int
Résultat void

update() public méthode

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

Property Details

health public_oe property

public int health
Résultat int