Property | Type | Description | |
---|---|---|---|
Color | Color | ||
Velocity | Vector2 |
Property | Type | Description | |
---|---|---|---|
Points | Vector2[] |
Method | Description | |
---|---|---|
Body ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Vector2 size, float rotation = 0f ) : System | ||
Draw ( |
||
Intersects ( |
Intersection detection function Mostly derived from http://www.codeproject.com/Articles/15573/2D-Polygon-Collision-Detection
|
|
MoveByPosition ( Vector2 by ) : void | ||
MoveToPosition ( Vector2 pos ) : void | ||
Raycast ( Vector2 rayStart, Vector2 rayDir ) : float |
Gets the parametric T value for the ray on start in direction dir, 0 if nothing Based on http://ncase.me/sight-and-light/
|
|
TestPoint ( Vector2 point ) : bool |
Currently making a small rectangle and using Intersect to TestPoint
|
|
Update ( float deltaTime ) : void |
public Body ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Vector2 size, float rotation = 0f ) : System | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
position | Vector2 | |
size | Vector2 | |
rotation | float | |
return | System |
public Draw ( |
||
spriteBatch | ||
return | void |
public abstract Intersects ( |
||
other | The other Body to check intersection with | |
return | Vector2 |
public abstract Raycast ( Vector2 rayStart, Vector2 rayDir ) : float | ||
rayStart | Vector2 | |
rayDir | Vector2 | |
return | float |