/// <summary> /// Helper function to determine the state of a ModuleAnimateGeneric. /// </summary> /// <param name="mag"></param> /// <returns></returns> internal static bool Extended(this ModuleAnimateGeneric mag) { Animation animation = mag.GetAnimation(); AnimationState animationState = animation[mag.animationName]; if (animationState != null && mag.IsMoving()) { return(animationState.normalizedSpeed > 0.0f); } else if (mag.Progress > 0.5f) { return(true); } else { return(false); } }
private bool Extended() { if (animationState == null) { Animation animation = animationModule.GetAnimation(); animationState = animation[animationModule.animationName]; } if (animationState != null && animationModule.IsMoving()) { return(animationState.normalizedSpeed > 0.0f); } else if (animationModule.Progress > 0.5f) { return(true); } else { return(false); } }