public final class AnimationStateMachine extends java.lang.Object implements IAnimationStateMachine
Constructor and Description |
---|
AnimationStateMachine(com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> parameters,
com.google.common.collect.ImmutableMap<java.lang.String,IClip> clips,
com.google.common.collect.ImmutableList<java.lang.String> states,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> transitions,
java.lang.String startState)
Deprecated.
|
AnimationStateMachine(com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> parameters,
com.google.common.collect.ImmutableMap<java.lang.String,IClip> clips,
com.google.common.collect.ImmutableList<java.lang.String> states,
com.google.common.collect.ImmutableMultimap<java.lang.String,java.lang.String> transitions,
java.lang.String startState) |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.lang3.tuple.Pair<IModelState,java.lang.Iterable<Event>> |
apply(float time)
Sample the state and events at the current time.
|
java.lang.String |
currentState()
Get current state name.
|
static AnimationStateMachine |
getMissing() |
static IAnimationStateMachine |
load(IResourceManager manager,
ResourceLocation location,
com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> customParameters)
Load a new instance if AnimationStateMachine at specified location, with specified custom parameters.
|
void |
shouldHandleSpecialEvents(boolean value)
Set to true if the machine should handle special events that come from the clips (they start with '!').
|
void |
transition(java.lang.String newState)
Transition to a new state.
|
@Deprecated public AnimationStateMachine(com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> parameters, com.google.common.collect.ImmutableMap<java.lang.String,IClip> clips, com.google.common.collect.ImmutableList<java.lang.String> states, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> transitions, java.lang.String startState)
public AnimationStateMachine(com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> parameters, com.google.common.collect.ImmutableMap<java.lang.String,IClip> clips, com.google.common.collect.ImmutableList<java.lang.String> states, com.google.common.collect.ImmutableMultimap<java.lang.String,java.lang.String> transitions, java.lang.String startState)
public org.apache.commons.lang3.tuple.Pair<IModelState,java.lang.Iterable<Event>> apply(float time)
IAnimationStateMachine
apply
in interface IAnimationStateMachine
public void transition(java.lang.String newState)
IAnimationStateMachine
transition
in interface IAnimationStateMachine
public java.lang.String currentState()
IAnimationStateMachine
currentState
in interface IAnimationStateMachine
public void shouldHandleSpecialEvents(boolean value)
IAnimationStateMachine
shouldHandleSpecialEvents
in interface IAnimationStateMachine
public static IAnimationStateMachine load(IResourceManager manager, ResourceLocation location, com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> customParameters)
public static AnimationStateMachine getMissing()