Package nl.colorize.multimedialib.scene
Class SimpleState
- java.lang.Object
-
- nl.colorize.multimedialib.scene.SimpleState
-
-
Constructor Summary
Constructors Constructor Description SimpleState(java.lang.String name, float duration, State next, boolean interruptable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleStatecreate(java.lang.String name)Convenience method to create a simple state that will remain active until it is interrupted by changing to a different state.booleanequals(java.lang.Object o)floatgetDuration()java.lang.StringgetName()StategetNext()inthashCode()booleanisInterruptable()static SimpleStatepermanent(java.lang.String name)Convenience method to create a simple state that will remain active forever and cannot be interrupted by changing to another state.static SimpleStatetimed(java.lang.String name, float duration, State next)Convenience method to create a simple state that is only active for a finite amount of time, after which it will change to the specified new state.java.lang.StringtoString()static SimpleStateuninterruptable(java.lang.String name, float duration, State next)Creates a state that is only active for a finite amount of time, and cannot be interrupted within this period.
-
-
-
Constructor Detail
-
SimpleState
public SimpleState(java.lang.String name, float duration, State next, boolean interruptable)
-
-
Method Detail
-
getDuration
public float getDuration()
- Specified by:
getDurationin interfaceState
-
isInterruptable
public boolean isInterruptable()
- Specified by:
isInterruptablein interfaceState
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
create
public static SimpleState create(java.lang.String name)
Convenience method to create a simple state that will remain active until it is interrupted by changing to a different state.
-
timed
public static SimpleState timed(java.lang.String name, float duration, State next)
Convenience method to create a simple state that is only active for a finite amount of time, after which it will change to the specified new state.
-
uninterruptable
public static SimpleState uninterruptable(java.lang.String name, float duration, State next)
Creates a state that is only active for a finite amount of time, and cannot be interrupted within this period.
-
permanent
public static SimpleState permanent(java.lang.String name)
Convenience method to create a simple state that will remain active forever and cannot be interrupted by changing to another state.
-
-