WXMC/proj/unity/Assets/WishRing.cs

24 lines
578 B
C#
Raw Permalink Normal View History

2024-12-04 16:18:46 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WishRing : MonoBehaviour
{
/* Please check the corresponding WishGodPageUI object to see how WishRing button is given a drawlot function */
private Animator anim;
private Button button;
void Start()
{
anim = GetComponentInChildren<Animator>();
button = GetComponentInChildren<Button>();
button.onClick.AddListener(onClickSwag);
}
public void onClickSwag()
{
anim.SetTrigger("isSwinging");
}
}