Class AnimationVariableSource
java.lang.Object
zombie.core.skinnedmodel.advancedanimation.AnimationVariableSource
- All Implemented Interfaces:
IAnimationVariableMap
,IAnimationVariableSource
- Direct Known Subclasses:
AnimatedModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearVariable
(String key) void
boolean
containsVariable
(String key) Returns all Game variables.Returns the specified variable slot.getVariable
(String key) Returns the specified variable slot.getVariable
(AnimationVariableHandle handle) Returns the specified variable slot.boolean
getVariableBoolean
(String key) Returns the specified variable, as a boolean.boolean
getVariableBoolean
(String key, boolean defaultVal) Returns the specified variable, as a boolean.float
getVariableFloat
(String key, float defaultVal) Returns the specified variable, as a float.getVariableString
(String key) Returns the specified variable.boolean
isVariable
(String name, String val) Compares (ignoring case) the value of the specified variable.void
setVariable
(String key, boolean value) void
setVariable
(String key, boolean defaultVal, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, boolean defaultVal, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackBool.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, float value) void
setVariable
(String key, float defaultVal, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, float defaultVal, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackFloat.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, int defaultVal, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, int defaultVal, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackInt.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, String value) void
setVariable
(String key, String defaultVal, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, String defaultVal, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackString.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackBool.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackFloat.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackInt.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet) Strong-typed utility function.void
setVariable
(String key, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackString.CallbackSetStrongTyped callbackSet) Strong-typed utility function.void
Set the specified animation variable slot.
-
Constructor Details
-
AnimationVariableSource
public AnimationVariableSource()
-
-
Method Details
-
getVariable
Returns the specified variable slot. Or NULL if not found.- Specified by:
getVariable
in interfaceIAnimationVariableSource
-
getVariable
Returns the specified variable slot. Or NULL if not found.- Specified by:
getVariable
in interfaceIAnimationVariableSource
-
getOrCreateVariable
Returns the specified variable slot. Creates a new slot if not found. Returns NULL if key is null, whitespace, or empty.- Specified by:
getOrCreateVariable
in interfaceIAnimationVariableMap
-
setVariable
Description copied from interface:IAnimationVariableMap
Set the specified animation variable slot. Overwriting an existing slot if necessary.- Specified by:
setVariable
in interfaceIAnimationVariableMap
-
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackBool.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackString.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackFloat.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackInt.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, boolean defaultVal, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, boolean defaultVal, AnimationVariableSlotCallbackBool.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackBool.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, String defaultVal, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, String defaultVal, AnimationVariableSlotCallbackString.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackString.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, float defaultVal, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, float defaultVal, AnimationVariableSlotCallbackFloat.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackFloat.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
public void setVariable(String key, int defaultVal, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet) Strong-typed utility function. -
setVariable
public void setVariable(String key, int defaultVal, AnimationVariableSlotCallbackInt.CallbackGetStrongTyped callbackGet, AnimationVariableSlotCallbackInt.CallbackSetStrongTyped callbackSet) Strong-typed utility function. -
setVariable
- Specified by:
setVariable
in interfaceIAnimationVariableMap
-
setVariable
- Specified by:
setVariable
in interfaceIAnimationVariableMap
-
setVariable
- Specified by:
setVariable
in interfaceIAnimationVariableMap
-
clearVariable
- Specified by:
clearVariable
in interfaceIAnimationVariableMap
-
clearVariables
public void clearVariables()- Specified by:
clearVariables
in interfaceIAnimationVariableMap
-
getVariableString
Returns the specified variable. Or an empty string "" if not found.- Specified by:
getVariableString
in interfaceIAnimationVariableSource
-
getVariableFloat
Returns the specified variable, as a float. Attempts to convert the string variable to a float. If that fails, or if variable not found, returns the defaultValue- Specified by:
getVariableFloat
in interfaceIAnimationVariableSource
-
getVariableBoolean
Returns the specified variable, as a boolean. Attempts to convert the string variable to a boolean. If that fails, or if variable not found, returns FALSE- Specified by:
getVariableBoolean
in interfaceIAnimationVariableSource
-
getVariableBoolean
Returns the specified variable, as a boolean. Attempts to convert the string variable to a boolean. If that fails, or if variable not found, returns defaultVal- Specified by:
getVariableBoolean
in interfaceIAnimationVariableSource
-
getGameVariables
Returns all Game variables.- Specified by:
getGameVariables
in interfaceIAnimationVariableSource
-
isVariable
Compares (ignoring case) the value of the specified variable. Returns TRUE if they match.- Specified by:
isVariable
in interfaceIAnimationVariableSource
-
containsVariable
- Specified by:
containsVariable
in interfaceIAnimationVariableSource
-