Newer
Older
using Spine.Unity;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SteveZuckt : 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
committed
Debug.Log("Steve zuckt Mouse Down");
/* If-statement to check if our player talks to Steve. If yes --> The animation is
played. If not --> he will not be animated.
*/
if(this.GetComponent<Entity>().dialogueInitiated)
{
currentAnimationState = "SteveAnprechen";
skeletonAnimation.AnimationName = "SteveAnprechen";
}
else
{
currentAnimationState = "<None>";
skeletonAnimation.AnimationName = "<None>";
}
}
}