Package com.xebisco.yield
Class Context
java.lang.Object
com.xebisco.yield.Context
- All Implemented Interfaces:
Runnable
This class represents a context that runs a specified behavior at a specified frame-rate.
-
Constructor Summary
ConstructorsConstructorDescriptionContext(ContextTime contextTime, AbstractBehavior abstractBehavior, String name) Constructs a new Context object. -
Method Summary
-
Constructor Details
-
Context
Constructs a new Context object.- Parameters:
contextTime- The context time object.abstractBehavior- The behavior to be run.name- The name of the thread.
-
-
Method Details
-
run
public void run() -
thread
Returns the thread that is running this context.- Returns:
- The thread object.
-
contextTime
This function returns the context time.- Returns:
- The contextTime object.
-
running
This function returns the value of the running variable.- Returns:
- The value of the running variable.
-
abstractBehavior
Returns the abstract behavior associated with this context.- Returns:
- The abstract behavior.
-