Package com.xebisco.yield.physics
Class PhysicsSystem
java.lang.Object
com.xebisco.yield.AbstractBehavior
com.xebisco.yield.SystemBehavior
com.xebisco.yield.physics.PhysicsSystem
- All Implemented Interfaces:
Behavior,Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jbox2d.dynamics.Worldb2World()gravity()voidonStart()This method is called when the behavior is started.voidonUpdate(ContextTime time) This method is called when the behavior needs to be updated with the current time.intdoubleppm()setGravity(Vector2D gravity) setPositionIterations(int positionIterations) setPpm(double ppm) setVelocityIterations(int velocityIterations) intMethods inherited from class com.xebisco.yield.SystemBehavior
close, scene, setSceneMethods inherited from class com.xebisco.yield.AbstractBehavior
frames, tick
-
Constructor Details
-
PhysicsSystem
public PhysicsSystem()
-
-
Method Details
-
onStart
public void onStart()Description copied from interface:BehaviorThis method is called when the behavior is started. It is typically used to initialize any necessary state or resources.- Specified by:
onStartin interfaceBehavior- Overrides:
onStartin classSystemBehavior
-
onUpdate
Description copied from interface:BehaviorThis method is called when the behavior needs to be updated with the current time. It is typically used to perform any necessary calculations or updates based on the current time.- Specified by:
onUpdatein interfaceBehavior- Overrides:
onUpdatein classSystemBehavior- Parameters:
time- The current time context.
-
b2World
public org.jbox2d.dynamics.World b2World() -
gravity
-
setGravity
-
velocityIterations
public int velocityIterations() -
setVelocityIterations
-
positionIterations
public int positionIterations() -
setPositionIterations
-
ppm
public double ppm() -
setPpm
-