Package com.xebisco.yield
Interface Behavior
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractBehavior,AbstractRenderable,AnimationPlayer,Application,AudioPlayer,BlankScene,BoxCollider2D,CircleCollider2D,Collider2D,ComponentBehavior,DistanceJoint2D,EdgeCollider2D,EmptyRenderable,Entity2D,Entity2DContainer,Joint2D,PhysicsBody,PhysicsSystem,RectangleMesh,RevoluteJoint2D,Scene,SystemBehavior,TextMesh,TexturedRectangleMesh
This interface represents a behavior that can be started and updated over time.
It extends the
Closeable interface to allow for proper resource management.-
Method Summary
Modifier and TypeMethodDescriptionvoidonStart()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.
-
Method Details
-
onStart
void onStart()This method is called when the behavior is started. It is typically used to initialize any necessary state or resources. -
onUpdate
This 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.- Parameters:
time- The current time context.
-