41 lines
936 B
C#
41 lines
936 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|