using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using UnityEngine.UI; public class BetBtn : MonoBehaviour { public static BetBtn instance; public int BetHorseId;//投注马匹id public GameObject BetList; public Button NumBtn; public Text BetText; public float BetValue;//投注的值 public float AllBetValue;//投注总值 public Button BetButton;//投注的按钮 // Start is called before the first frame update void Start() { instance = this; BetList.SetActive(false); NumBtn.onClick.AddListener(OnClickNumBtn); BetValue = 50;//默认50 SetBet(); } // Update is called once per frame void Update() { } void BetOnClick()//点击投注 { AllManeger.instance.Fuck523(); foreach (HorseInfo house in AllManeger.instance.horseInfos) { } } void OnClickNumBtn() { BetList.SetActive(true); } void SetBet() { // 获取所有的Button组件 Button[] buttons = BetList.GetComponentsInChildren