Package de.gurkenlabs.litiengine.physics
Class StickyForce
java.lang.Object
de.gurkenlabs.litiengine.physics.Force
de.gurkenlabs.litiengine.physics.StickyForce
The Force implementation sticks to an entity in terms of its location.
-
Constructor Summary
ConstructorsConstructorDescriptionStickyForce(IEntity forceEntity, float strength, float size) Instantiates a new sticky force.StickyForce(Point2D center, float strength, float size) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the force entity.Gets the location.Methods inherited from class de.gurkenlabs.litiengine.physics.Force
cancelOnCollision, end, getIdentifier, getStrength, hasEnded, hasReached, setCancelOnCollision, setCancelOnReached, setIdentifier, setLocation, setStrength, toString
-
Constructor Details
-
StickyForce
Instantiates a new sticky force.- Parameters:
forceEntity- The entity to who's location this force will be boundstrength- The strength/intensity of this forcesize- The size of this force
-
StickyForce
-
-
Method Details
-
getForceEntity
Gets the force entity.- Returns:
- the force entity
-
getLocation
Description copied from class:ForceGets the location.- Overrides:
getLocationin classForce- Returns:
- the location
-
cancelOnReached
public boolean cancelOnReached()- Overrides:
cancelOnReachedin classForce
-