C# Class TraceRacer.WorldObject

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

Public Properties

Property Type Description
player PlayerObject

Public Methods

Method 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

Method Description
IsTouching ( PlayerObject playerObject ) : bool

Checks if player touches the top of the world.

Method Details

IsColliding() public method

Collision detection between world and player.
public IsColliding ( PlayerObject playerObject ) : bool
playerObject PlayerObject
return bool

WorldObject() public method

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

addLine() public method

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

addLine() public method

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

createGates() public method

public createGates ( ) : void
return void

fillBegin() public method

public fillBegin ( int pos, int height ) : void
pos int
height int
return void

getClosestGate() public method

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

getGates() public method

public getGates ( ) : List
return List

getLine() public method

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

getLineQueue() public method

public getLineQueue ( ) : List
return List

getPlayer() public method

public getPlayer ( ) : PlayerObject
return PlayerObject

getPositionDifference() public method

public getPositionDifference ( ) : int
return int

removeLine() public method

public removeLine ( int pos ) : void
pos int
return void

updateGates() public method

public updateGates ( ) : void
return void

Property Details

player public_oe property

public PlayerObject,TraceRacer player
return PlayerObject