_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/GLScripts/Anilottery.cs

41 lines
936 B
C#
Raw Normal View History

2024-12-12 21:02:09 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Anilottery : MonoBehaviour
{
public GameObject YelloBox;
public Animator YelloAni;
public GameObject PurpleBox;
public Animator PurpleAni;
public GameObject RewardPanel;
// Start is called before the first frame update
void Start()
{
RewardPanel.SetActive(false);
}
public void OpenBox(int id = 0)//0<>ǻƣ<C7BB>1<EFBFBD><31><EFBFBD><EFBFBD>
{
if (id == 0)
{
PurpleBox.SetActive(false);
YelloBox.SetActive(true);
YelloAni.SetBool("IsOpen", true);
}
else
{
YelloBox.SetActive(false);
PurpleBox.SetActive(true);
PurpleAni.SetBool("IsOpen", true);
}
}
public void ReturnState()//<2F>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>״̬
{
YelloAni.SetBool("IsOpen", false);
PurpleAni.SetBool("IsOpen", false);
}
}