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);
|
|
|
|
|
}
|
2024-12-13 10:02:21 +08:00
|
|
|
|
public void ShowReward()
|
|
|
|
|
{
|
|
|
|
|
RewardPanel.SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
public void OpenBox(int id )//0<>ǻƣ<C7BB>1<EFBFBD><31><EFBFBD><EFBFBD>
|
2024-12-12 21:02:09 +08:00
|
|
|
|
{
|
|
|
|
|
if (id == 0)
|
|
|
|
|
{
|
|
|
|
|
PurpleBox.SetActive(false);
|
|
|
|
|
YelloBox.SetActive(true);
|
2024-12-13 10:02:21 +08:00
|
|
|
|
|
2024-12-12 21:02:09 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
YelloBox.SetActive(false);
|
|
|
|
|
PurpleBox.SetActive(true);
|
2024-12-13 10:02:21 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OpenB(int id)//0<>ǻƣ<C7BB>1<EFBFBD><31><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
if (id == 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
YelloAni.SetBool("IsOpen", true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
2024-12-12 21:02:09 +08:00
|
|
|
|
PurpleAni.SetBool("IsOpen", true);
|
2024-12-13 10:02:21 +08:00
|
|
|
|
|
2024-12-12 21:02:09 +08:00
|
|
|
|
}
|
2024-12-13 10:02:21 +08:00
|
|
|
|
|
2024-12-12 21:02:09 +08:00
|
|
|
|
}
|
|
|
|
|
public void ReturnState()//<2F>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>״̬
|
|
|
|
|
{
|
|
|
|
|
YelloAni.SetBool("IsOpen", false);
|
|
|
|
|
PurpleAni.SetBool("IsOpen", false);
|
|
|
|
|
}
|
|
|
|
|
}
|