ZoeRobotIngles/Assets/Jogos/WhackAVirus/Scripts/WhackStartBehaviour.cs

24 lines
517 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WhackStartBehaviour : MonoBehaviour
{
public Button startBtn;
private Animator anim;
public void Awake()
{
anim = GetComponent<Animator>();
startBtn = GetComponentInChildren<Button>();
startBtn.onClick.AddListener(HandleClick);
}
public void HandleClick()
{
anim.SetTrigger("Hide");
WhackManager.instance.canPlay = true;
}
}