C# Class geek.GameEngine.Visuals.VisualObjectBase

Mostra file Open project: impworks/xna.geek.engine Class Usage Examples

Public Properties

Property Type Description
IsVisible bool
Position Microsoft.Xna.Framework.Vector2

Public Methods

Method Description
BringDown ( ) : void

Bring the object 1 layer down in the drawing order.

BringToBack ( ) : void

Bring the object to the bottom of current object batch.

BringToFront ( ) : void

Bring the object to the top of current object batch.

BringUp ( ) : void

Bring the object 1 layer up in the drawing order.

Draw ( SpriteBatch batch ) : void

The update screen method.

GetBoundingBox ( bool absolute = false ) : Rectangle

Get a bounding box for the current object.

GetPosition ( bool absolute = false ) : Vector2

Get a position depending on the flag.

Remove ( ) : void

Remove the object from visual list.

ResetLayerId ( ) : void

Reset the layer id to start new drawing loop.

Update ( ) : void

The update logic method.

Protected Methods

Method Description
VisualObjectBase ( ) : System.Collections.Generic

Private Methods

Method Description
getContainingObjectList ( List &list, int &index ) : bool

Gets the parent VisualObjectBatch's list for further manipulations with layering.

Method Details

BringDown() public method

Bring the object 1 layer down in the drawing order.
public BringDown ( ) : void
return void

BringToBack() public method

Bring the object to the bottom of current object batch.
public BringToBack ( ) : void
return void

BringToFront() public method

Bring the object to the top of current object batch.
public BringToFront ( ) : void
return void

BringUp() public method

Bring the object 1 layer up in the drawing order.
public BringUp ( ) : void
return void

Draw() public abstract method

The update screen method.
public abstract Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch to draw to.
return void

GetBoundingBox() public method

Get a bounding box for the current object.
public GetBoundingBox ( bool absolute = false ) : Rectangle
absolute bool Absolute or relative coordinates?
return Microsoft.Xna.Framework.Rectangle

GetPosition() public method

Get a position depending on the flag.
public GetPosition ( bool absolute = false ) : Vector2
absolute bool Absolute or relative position.
return Microsoft.Xna.Framework.Vector2

Remove() public method

Remove the object from visual list.
public Remove ( ) : void
return void

ResetLayerId() public static method

Reset the layer id to start new drawing loop.
public static ResetLayerId ( ) : void
return void

Update() public abstract method

The update logic method.
public abstract Update ( ) : void
return void

VisualObjectBase() protected method

protected VisualObjectBase ( ) : System.Collections.Generic
return System.Collections.Generic

Property Details

IsVisible public_oe property

Gets or sets the flag indicating the object is to be displayed.
public bool IsVisible
return bool

Position public_oe property

Visual object position relative to it's parent (scene, batch, etc).
public Vector2,Microsoft.Xna.Framework Position
return Microsoft.Xna.Framework.Vector2