Files
AppleHillsProduction/Assets/Scripts/Animation/BirdEyesBehavior.cs

44 lines
1.0 KiB
C#
Raw Normal View History

2025-09-10 22:17:51 +02:00
using UnityEngine;
using Pixelplacement;
public class BirdEyesBehavior : MonoBehaviour
{
private StateMachine statemachine;
private Animator animator;
public bool correctItemIsIn;
[SerializeField] private Animator bushAnimator; // Assign in Inspector
2025-09-10 22:17:51 +02:00
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
statemachine = GetComponent<StateMachine>();
animator = GetComponentInChildren<Animator>();
}
// Update is called once per frame
void Update()
{
2025-09-10 22:17:51 +02:00
}
public void CorrectItem()
2025-09-10 22:17:51 +02:00
{
correctItemIsIn = true;
2025-09-10 22:17:51 +02:00
animator.SetTrigger("RightGuess");
}
public void IncorrectItem()
{
correctItemIsIn = false;
animator.SetTrigger("WrongGuess");
}
public void NoItem()
2025-09-10 22:17:51 +02:00
{
animator.SetTrigger("NoGuess");
2025-09-10 22:17:51 +02:00
}
public void BirdReveal()
2025-09-10 22:17:51 +02:00
{
bushAnimator.SetTrigger("wolterisout");
statemachine.ChangeState ("BirdSpawned");
2025-09-10 22:17:51 +02:00
}
}