Exemplo n.º 1
0
    public void PlayAnimation(string animationName)
    {
        //Debug.Log("[PLAY ANIMATION] \"" + animationName +"\"");
        StopAllCoroutines();
        if (string.IsNullOrEmpty(AnimationCollection.GetAnimationStruct(animationName).AnimationName))
        {
            Debug.LogWarning("Tried getting an animation that doesn't exist.");
            return;
        }
        Animator.CrossFadeInFixedTime(animationName, .2f, 1);
        //Transition back to Null!

        //Animator.CrossFadeInFixedTime("Null", .2f, 1, 2f);
        //StartCoroutine(IEQueueStopAnimation(.2f, animationName));
    }