using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerInfo : MonoBehaviour { public static PlayerInfo instance; public float Money = 1000; public int AllBetCoins;//×ܹ²ÏÂ×¢µ° // Start is called before the first frame update void Start() { instance = this; EggNum.instance.eggNumText.text=Money.ToString(); } public bool SetMoney(float add) { if (Money+add>=0) { float start = Money; Money += add; EggNum.instance.SetEggNumText(start); return true; } Debug.Log("Ç®²»¹»"); return false; } // Update is called once per frame void Update() { } }