using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Lottery : MonoBehaviour { public GameObject LotteryPanel; public Button LotteryBtn; void Start() { LotteryBtn.onClick.AddListener(LotteryClick); } void LotteryClick() { if ((WaterPanel.instance.waterCount-999) > 0) { WaterPanel.instance.setWater(-999); LotteryPanel.gameObject.SetActive(true); } else { Promptmgr.Instance.PromptBubble("水量不足,无法抽奖"); } } // Update is called once per frame void Update() { } }