C# Class TraceRacer.PlayerObject

This is the player game component.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Afficher le fichier Open project: alexcoco/trace_racer Class Usage Examples

Méthodes publiques

Свойство Type Description
Position Vector2
Speed Vector2
airtime int
gameOver bool

Méthodes publiques

Méthode Description
Draw ( GameTime gameTime ) : void

Draws the player on the screen.

Initialize ( ) : void

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.

PlayerObject ( Microsoft.Xna.Framework.Game game, SpriteBatch givenSpriteBatch, WorldObject world ) : System

Constructor initializes everything.

Update ( GameTime gameTime ) : void

Allows the game component to update itself.

setActive ( ) : void
setPosition ( Vector2 v ) : void

Private Methods

Méthode Description
adjustSpeed ( int difference ) : void

Method Details

Draw() public méthode

Draws the player on the screen.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Initialize() public méthode

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.
public Initialize ( ) : void
Résultat void

PlayerObject() public méthode

Constructor initializes everything.
public PlayerObject ( Microsoft.Xna.Framework.Game game, SpriteBatch givenSpriteBatch, WorldObject world ) : System
game Microsoft.Xna.Framework.Game
givenSpriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
world WorldObject
Résultat System

Update() public méthode

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

setActive() public méthode

public setActive ( ) : void
Résultat void

setPosition() public méthode

public setPosition ( Vector2 v ) : void
v Vector2
Résultat void

Property Details

Position public_oe property

public Vector2 Position
Résultat Vector2

Speed public_oe property

public Vector2 Speed
Résultat Vector2

airtime public_oe property

public int airtime
Résultat int

gameOver public_oe property

public bool gameOver
Résultat bool