public class Force
extends java.lang.Object
| Constructor and Description |
|---|
Force(java.awt.geom.Point2D location,
float strength,
float size)
Instantiates a new force.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelOnCollision()
Cancel on collision.
|
boolean |
cancelOnReached() |
void |
end() |
java.awt.geom.Point2D |
getLocation()
Gets the location.
|
float |
getStrength()
Gets the strength in pixels per second.
|
boolean |
hasEnded()
Checks for ended.
|
boolean |
hasReached(ICollisionEntity entity) |
void |
setCancelOnCollision(boolean cancelOnCollision) |
void |
setCancelOnReached(boolean cancelOnReached) |
void |
setLocation(java.awt.geom.Point2D location) |
public Force(java.awt.geom.Point2D location,
float strength,
float size)
location - The location where the force is originating fromstrength - The strength/intensity of this force instancesize - The size of this force (used to determine if/when an entity has
reached the force)public boolean cancelOnCollision()
public boolean cancelOnReached()
public void end()
public java.awt.geom.Point2D getLocation()
public float getStrength()
public boolean hasEnded()
public boolean hasReached(ICollisionEntity entity)
public void setCancelOnCollision(boolean cancelOnCollision)
public void setCancelOnReached(boolean cancelOnReached)
public void setLocation(java.awt.geom.Point2D location)