Files
AppleHillsProduction/Assets/Scripts/Animation/BirdEyesBehavior.cs
Damian dea470f93f Replaced almost all placeholders with final art
Some animations still need to be added and replaced, but most of the sprites are final now.
2025-10-07 13:04:14 +02:00

44 lines
1.0 KiB
C#

using UnityEngine;
using Pixelplacement;
public class BirdEyesBehavior : MonoBehaviour
{
private StateMachine statemachine;
private Animator animator;
public bool correctItemIsIn;
[SerializeField] private Animator bushAnimator; // Assign in Inspector
// 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()
{
}
public void CorrectItem()
{
correctItemIsIn = true;
animator.SetTrigger("RightGuess");
}
public void IncorrectItem()
{
correctItemIsIn = false;
animator.SetTrigger("WrongGuess");
}
public void NoItem()
{
animator.SetTrigger("NoGuess");
}
public void BirdReveal()
{
bushAnimator.SetTrigger("wolterisout");
statemachine.ChangeState ("BirdSpawned");
}
}