public class AttackPhysics extends PhysicsComponent
PhysicsComponent.AABB, PhysicsComponent.BoundingVolume, PhysicsComponent.Collision, PhysicsComponent.Sphereacceleration, boundingVolume, gravity, RECTANGULAR, SPHERE, x_Vel, y_Vel| Constructor and Description |
|---|
AttackPhysics(float x,
float y,
Type type)
creates a new attack with a rectangular bounding volume and the types speed
|
| Modifier and Type | Method and Description |
|---|---|
void |
handlePhysics(GameObject object,
double elapsedTime)
updates the attacks position and decreasing its health to make it disappear after a certain time
|
getCollisionPoint, intersects, intersects, intersects, leapFrogIntegration, resolveSolidCollisionpublic AttackPhysics(float x,
float y,
Type type)
x - the x coordinate of the object this component belongs toy - the y coordinate of the object this component belongs totype - the objects typepublic void handlePhysics(GameObject object, double elapsedTime)
handlePhysics in class PhysicsComponentobject - the object to updateelapsedTime - the time elapsed since the last update