24 lines
578 B
C#
24 lines
578 B
C#
|
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");
|
||
|
}
|
||
|
}
|