Package de.gurkenlabs.litiengine.physics
Class StickyForce
java.lang.Object
de.gurkenlabs.litiengine.physics.Force
de.gurkenlabs.litiengine.physics.StickyForce
public class StickyForce
extends ForceThe Force implementation sticks to an entity in terms of its location.
Constructor Summary
Constructors Constructor Description StickyForce(IEntity forceEntity, float strength, float size)Instantiates a new sticky force.StickyForce(java.awt.geom.Point2D center, float strength, float size)Method Summary
Modifier and Type Method Description IEntitygetForceEntiy()Gets the force entiy.java.awt.geom.Point2DgetLocation()Gets the location.Methods inherited from class de.gurkenlabs.litiengine.physics.Force
cancelOnCollision, cancelOnReached, 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
public StickyForce(java.awt.geom.Point2D center, float strength, float size)
Method Details
getForceEntiy
Gets the force entiy.- Returns:
- the force entiy
getLocation
public java.awt.geom.Point2D getLocation()Description copied from class:ForceGets the location.- Overrides:
getLocationin classForce- Returns:
- the location
