C# Class TraceRacer.WorldObject

Keeps track of the world that the user builds.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Afficher le fichier Open project: alexcoco/trace_racer Class Usage Examples

Méthodes publiques

Свойство Type Description
player PlayerObject

Méthodes publiques

Méthode Description
IsColliding ( PlayerObject playerObject ) : bool

Collision detection between world and player.

WorldObject ( Microsoft.Xna.Framework.Game g, SpriteBatch sb ) : System
addLine ( int height ) : void

Adds a specific line to the end of the world.

addLine ( int pos, int height ) : void

Adds a specific line to the specified position of the world.

createGates ( ) : void
fillBegin ( int pos, int height ) : void
getClosestGate ( PlayerObject player ) : Gate

Gets the closest gate that intersects with the player.

getGates ( ) : List
getLine ( int lineNum ) : WorldLine

Gets a specific line from the world.

getLineQueue ( ) : List
getPlayer ( ) : PlayerObject
getPositionDifference ( ) : int
removeLine ( int pos ) : void
updateGates ( ) : void

Private Methods

Méthode Description
IsTouching ( PlayerObject playerObject ) : bool

Checks if player touches the top of the world.

Method Details

IsColliding() public méthode

Collision detection between world and player.
public IsColliding ( PlayerObject playerObject ) : bool
playerObject PlayerObject
Résultat bool

WorldObject() public méthode

public WorldObject ( Microsoft.Xna.Framework.Game g, SpriteBatch sb ) : System
g Microsoft.Xna.Framework.Game
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat System

addLine() public méthode

Adds a specific line to the end of the world.
public addLine ( int height ) : void
height int
Résultat void

addLine() public méthode

Adds a specific line to the specified position of the world.
public addLine ( int pos, int height ) : void
pos int
height int
Résultat void

createGates() public méthode

public createGates ( ) : void
Résultat void

fillBegin() public méthode

public fillBegin ( int pos, int height ) : void
pos int
height int
Résultat void

getClosestGate() public méthode

Gets the closest gate that intersects with the player.
public getClosestGate ( PlayerObject player ) : Gate
player PlayerObject
Résultat Gate

getGates() public méthode

public getGates ( ) : List
Résultat List

getLine() public méthode

Gets a specific line from the world.
public getLine ( int lineNum ) : WorldLine
lineNum int
Résultat WorldLine

getLineQueue() public méthode

public getLineQueue ( ) : List
Résultat List

getPlayer() public méthode

public getPlayer ( ) : PlayerObject
Résultat PlayerObject

getPositionDifference() public méthode

public getPositionDifference ( ) : int
Résultat int

removeLine() public méthode

public removeLine ( int pos ) : void
pos int
Résultat void

updateGates() public méthode

public updateGates ( ) : void
Résultat void

Property Details

player public_oe property

public PlayerObject,TraceRacer player
Résultat PlayerObject