Property | Type | Description | |
---|---|---|---|
actionPoint | Vector2 | ||
boundingBox | |||
characteristics | List |
||
currentState | string | ||
drawingBox | |||
prevLocation | Vector2 | ||
sprite | Sprite | ||
toDestroy | bool |
Method | Description | |
---|---|---|
Draw ( |
Draws the entity to its current location.
|
|
Entity ( ) : System |
A no parameter entity for conveniences sake.
|
|
Entity ( Vector2 location, |
Constructs a basic entity. This is a more accessible constructor. In general, use this constructor when making new entities.
|
|
Entity ( float x, float y, |
Constructs a basic entity. This is the technical constructor. Unless you understand exactly how the entity is stored, I recommend using the other constructor.
|
|
Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager ) : void |
Loads any assets this particular entity needs.
|
|
Update ( |
Updates the entity... yeah.
|
|
collidesWith ( Entity other ) : bool |
Detects collisions between another entity. Uses the rectangle defining sprite to detect collisions.
|
public Draw ( |
||
canvas | An initialized sprite batch to draw the sprite upon. | |
return | void |
public Entity ( Vector2 location, |
||
location | Vector2 | The location of the entity relative to global space. Note that the reference point of the entity is the center of the bounding box. |
drawBox | The box to which the sprite will be drawn. Only the width and height will be used. | |
boundingBox | The bounding box of the entity relative to the upper right hand corner of the entity. | |
return | System |
public Entity ( float x, float y, |
||
x | float | The x coordinate of the action point. |
y | float | The y coordinate of the action point. |
drawBox | The draw box defines the area to which the sprite /// is drawn relative to the upper left hand corner.. | |
boundingBox | The bounding box relative to the action point. | |
return | System |
public Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager ) : void | ||
contentManager | Microsoft.Xna.Framework.Content.ContentManager | |
return | void |
public Update ( |
||
gameTime | Even has the option for frame rate, pretty cool eh? | |
gameReference | The ugly global game reference of doom. | |
return | void |
public collidesWith ( Entity other ) : bool | ||
other | Entity | The entity to detect collision with. |
return | bool |
protected Rectangle,Microsoft.Xna.Framework boundingBox | ||
return |
protected Rectangle,Microsoft.Xna.Framework drawingBox | ||
return |