Cute_demon_attacks/meng_yao/Assets/script/TanChuang/Lottery.cs
2024-11-14 17:23:08 +08:00

33 lines
681 B
C#

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()
{
}
}