Skip to content
Snippets Groups Projects
JosieAnimation.cs 852 B
Newer Older
Meike Wienholt's avatar
Meike Wienholt committed
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Spine.Unity;

public class JosieAnimation : MonoBehaviour
{
    SkeletonAnimation skeletonAnimation;
    string currentAnimationState = "<None>";

    // Start is called before the first frame update
    void Start()
    {
        skeletonAnimation = GetComponent<SkeletonAnimation>();
    }

    // Update is called once per frame
    void Update()
    {

        /* see stevezuckt.cs for more informations
         */
Meike Wienholt's avatar
Meike Wienholt committed
        if (this.GetComponent<Entity>().dialogueInitiated)
        {
            currentAnimationState = "BoxerinSprechend";
            skeletonAnimation.AnimationName = "BoxerinSprechend";
        }
        else
        {
            currentAnimationState = "<None>";
            skeletonAnimation.AnimationName = "<None>";
        }
    }
}