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

public class JonathanZuckt : 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()
    {
Meike Wienholt's avatar
Meike Wienholt committed
        if (this.GetComponent<Entity>().dialogueInitiated)
        {
            currentAnimationState = "IdleGiraffe";
            skeletonAnimation.AnimationName = "IdleGiraffe";
        }
        else
        {
            currentAnimationState = "<None>";
            skeletonAnimation.AnimationName = "<None>";
        }
    }

    //void OnMouseDown()
    //{
    //    skeletonAnimation.AnimationName = "SteveAnsprechen";
    //    //currentAnimationState = "animation";
    //    Debug.Log("HAllo, ich bin getriggered");

    //}
}