コード例 #1
0
	/// <summary>
	/// This is callled when this commponent is reset. 
	/// </summary>
	public override void Reset()
	{
		base.Reset();
			
		targetProperty = Defaults.targetProperty;	
		targetAnimation = Defaults.targetAnimation;
	}
コード例 #2
0
    /// <summary>
    /// This is callled when this commponent is reset.
    /// </summary>
    public override void Reset()
    {
        base.Reset();

        targetProperty  = Defaults.targetProperty;
        targetAnimation = Defaults.targetAnimation;
    }
コード例 #3
0
    /// <summary>
    /// This function is used to help set basic properties on a animation state
    /// in a generic way.
    /// </summary>
    /// <param name="animationState">The animation state whose properties are to be set.</param>
    /// <param name="targetProperty">The target property to set.</param>
    /// <param name="propertyValue">The value to set the target property to.</param>
    public static void SetAnimationStateProperty(AnimationState animationState, AnimationStateProperty targetProperty, float propertyValue)
    {
        //check if the animation is null
        if (animationState == null)
        {
            return;
        }

        //set the property
        switch (targetProperty)
        {
        case AnimationStateProperty.Speed:
            animationState.speed = propertyValue;
            break;

        case AnimationStateProperty.NormalizedTime:
            animationState.normalizedTime = propertyValue;
            break;

        case AnimationStateProperty.Weight:
            animationState.weight = propertyValue;
            break;

        default:
            break;
        }
    }
コード例 #4
0
    /// <summary>
    /// This function is used to help set basic properties on a animation state
    /// in a generic way.
    /// </summary>
    /// <param name="animationState">The animation state whose properties are to be set.</param>
    /// <param name="targetProperty">The target property to set.</param>
    /// <param name="propertyValue">The value to set the target property to.</param>
	public static void SetAnimationStateProperty(AnimationState animationState, AnimationStateProperty targetProperty, float propertyValue)
	{
		//check if the animation is null
        if (animationState == null)
		{
			return;
		}

        //set the property
        switch (targetProperty)
        {
            case AnimationStateProperty.Speed:
                animationState.speed = propertyValue;
                break;
            case AnimationStateProperty.NormalizedTime:
                animationState.normalizedTime = propertyValue;
                break;
            case AnimationStateProperty.Weight:
                animationState.weight = propertyValue;
                break;
            default:
                break;
        }
	}