Method | Description | |
---|---|---|
AddCollisionUnit ( |
Add a CollisionUnit to the Pharaoh's control.
|
|
AddPhysicsBaby ( |
Add a PhysicsBaby to be managed by the Pharaoh.
|
|
DrawCollisionGrid ( Microsoft.Xna.Framework.Graphics.Texture2D gridTexture ) : void |
Helper function to draw the currently active physics grid.
|
|
GetGravity ( ) : Vector2 |
Get the game gravity.
|
|
GetInstance ( ) : |
Get the PhysicsPharaoh singleton.
|
|
Initialize ( Vector2 worldSize, Vector2 collisionCellSize ) : void |
Initialize the PhysicsPharaoh.
|
|
RemoveCollisionUnit ( |
Remove a CollisionUnit from the Pharaoh's control.
|
|
RemovePhysicsBaby ( |
Remove a PhysicsBaby from the Pharaoh's control.
|
|
SetGravity ( Vector2 gravity ) : void |
Set the game gravity for all physics babies.
|
|
Update ( |
Update the game's physics system.
|
Method | Description | |
---|---|---|
PhysicsPharaoh ( ) : System |
public AddCollisionUnit ( |
||
unit | The CollisionUnit to add. | |
return | void |
public AddPhysicsBaby ( |
||
physBaby | The PhysicsBaby to add. | |
return | void |
public DrawCollisionGrid ( Microsoft.Xna.Framework.Graphics.Texture2D gridTexture ) : void | ||
gridTexture | Microsoft.Xna.Framework.Graphics.Texture2D | The texture that represents a cell within the physics grid. |
return | void |
public static GetInstance ( ) : |
||
return |
public Initialize ( Vector2 worldSize, Vector2 collisionCellSize ) : void | ||
worldSize | Vector2 | The size of the physical map. |
collisionCellSize | Vector2 | The size of a grid within the physical map. |
return | void |
public RemoveCollisionUnit ( |
||
unit | the CollisionUnit to remove. | |
return | void |
public RemovePhysicsBaby ( |
||
physBaby | The PhysicsBaby to free. | |
return | void |
public SetGravity ( Vector2 gravity ) : void | ||
gravity | Vector2 | Gravity to affect all units. |
return | void |
public Update ( |
||
gameTime | The current GameTime. | |
return | void |