public interface IBehavior
Modifier and Type | Method and Description |
---|---|
void |
abort()
Called when to stop this behavior without caring for stopping it softly
|
int |
getConsecutivePerforms() |
float |
getIntensity() |
java.lang.String |
getName()
Retrieve the behavior name
|
int |
getPerforms()
Retrieve the number of times this behavior has been performed/initialized
|
IBehavior |
getRootBehavior()
A call does not have side effects.
|
int |
getSuccessfulPerforms()
This method will only return sensible values for those behaviors that have
implemented a corresponding estimation what successful means.
|
int |
getUnsuccessfulPerforms()
This method will only return sensible values for those behaviors that have
implemented a corresponding estimation what successful means.
|
void |
init()
Reinitializes the Behavior-StateMachine (if present)
|
boolean |
isFinished()
Check if this behavior is finished performing
|
void |
onLeavingBehavior(IBehavior newBehavior)
Called to notify this behavior that is no longer performed and replaced by
the new behavior.
|
void |
perform()
Called to perform the behavior
|
void |
reload()
Reloads this behaviors.
|
void |
setIntensity(float intensity) |
void |
stayIn()
Called if we decided again for that behavior
|
IBehavior |
switchFrom(IBehavior actualBehavior)
Decide if it is possible to switch to this behavior from the current
behavior.
|
void init()
void perform()
java.lang.String getName()
boolean isFinished()
void abort()
IBehavior switchFrom(IBehavior actualBehavior)
actualBehavior
- the currently/actually performed behaviorvoid onLeavingBehavior(IBehavior newBehavior)
newBehavior
- the new behavior which will be performed after this
behaviorvoid stayIn()
float getIntensity()
void setIntensity(float intensity)
intensity
- the intensity with which to perform the behavior. Values
are free to use, but are typically in the range of [0..1]int getPerforms()
int getSuccessfulPerforms()
int getUnsuccessfulPerforms()
IBehavior getRootBehavior()
int getConsecutivePerforms()
void reload()