Свойство | Type | Description | |
---|---|---|---|
MEnvironment | PhysicsEnvironment | ||
MMass | float |
Méthode | Description | |
---|---|---|
AddForce ( Vector2 force ) : void |
Adds an additional force to the physics object
|
|
ApplyImmediateForce ( Vector2 force ) : void |
Applies the force immediately. This will not be permanant
|
|
ChangeGravityForceDirection ( GravityDirections direction ) : void |
Reorient gravity in the given direction
|
|
Equals ( otherObject otherObject ) : System | ||
FixForBounds ( int width, int height, bool isFixed ) : void |
TEMP METHOD - WILL GIVE THE PLAYER THE ABILITY TO FALL FROM ONE END OF THE SCREEN TO THE OTHER
|
|
GetCollitionDepth ( GameObject otherObject ) : Vector2 |
finds how deep they are intersecting (That is what she said!)
|
|
HandleCollideBoxAndBox ( GameObject otherObject ) : int |
Handles collision for two boxes (this, and other)
|
|
HandleCollideCircleAndBox ( GameObject otherObject ) : int |
Handles collision for circle and Box (circle =this)
|
|
HandleCollideCircleAndCircle ( GameObject otherObject ) : int |
Handles collision for circle and circle
|
|
HandleCollisionList ( List |
Allows for only one collision to be done. Whichever object this is colliding with deepest, handle only that collision.
|
|
HandleCollisions ( GameObject obj ) : bool |
Decides on the collision detection method for this and the given object
|
|
IsCollidingBoxAndBox ( GameObject otherObject ) : bool |
Returns true if the physics objects are colliding with each other (only good for 2 boxes)
|
|
PhysicsObject ( Microsoft.Xna.Framework.Content.ContentManager content, PhysicsEnvironment &environment, float friction, |
Constructs a PhysicsObject; Loads the required info from the content pipeline, and defines its size and location
|
public AddForce ( Vector2 force ) : void | ||
force | Vector2 | Force to be added |
Résultat | void |
public ApplyImmediateForce ( Vector2 force ) : void | ||
force | Vector2 | Force to apply |
Résultat | void |
public ChangeGravityForceDirection ( GravityDirections direction ) : void | ||
direction | GravityDirections | Direction to enforce gravity on |
Résultat | void |
public Equals ( otherObject otherObject ) : System | ||
otherObject | otherObject | |
Résultat | System |
public FixForBounds ( int width, int height, bool isFixed ) : void | ||
width | int | |
height | int | |
isFixed | bool | |
Résultat | void |
public GetCollitionDepth ( GameObject otherObject ) : Vector2 | ||
otherObject | GameObject | |
Résultat | Vector2 |
public HandleCollideBoxAndBox ( GameObject otherObject ) : int | ||
otherObject | GameObject | object to do collision on(box) |
Résultat | int |
public HandleCollideCircleAndBox ( GameObject otherObject ) : int | ||
otherObject | GameObject | object to do collision on(box) |
Résultat | int |
public HandleCollideCircleAndCircle ( GameObject otherObject ) : int | ||
otherObject | GameObject | object to do collision on(circle) |
Résultat | int |
public HandleCollisionList ( List |
||
objList | List |
list of objects that this is colliding with |
Résultat | void |
public HandleCollisions ( GameObject obj ) : bool | ||
obj | GameObject | object we are testing |
Résultat | bool |
public IsCollidingBoxAndBox ( GameObject otherObject ) : bool | ||
otherObject | GameObject | The other object to test against |
Résultat | bool |
public PhysicsObject ( Microsoft.Xna.Framework.Content.ContentManager content, PhysicsEnvironment &environment, float friction, |
||
content | Microsoft.Xna.Framework.Content.ContentManager | Content pipeline |
environment | PhysicsEnvironment | |
friction | float | |
entity | ||
Résultat | System |
protected PhysicsEnvironment MEnvironment | ||
Résultat | PhysicsEnvironment |