2024-11-13 18:01:18 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2024-11-18 16:53:39 +08:00
|
|
|
|
using TMPro;
|
2024-11-13 18:01:18 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class PlayerInfo : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static PlayerInfo instance;
|
|
|
|
|
|
|
|
|
|
public float Money = 1000;
|
2024-11-18 16:53:39 +08:00
|
|
|
|
public float AllBetCoins;//<2F>ܹ<EFBFBD><DCB9><EFBFBD>ע<EFBFBD><D7A2>
|
|
|
|
|
public TextMeshProUGUI SelfWoniuText;//<2F><>ţ<EFBFBD><C5A3>ע<EFBFBD><D7A2>ʾ<EFBFBD>ı<EFBFBD>
|
2024-11-18 17:02:12 +08:00
|
|
|
|
public bool HaveBet;//<2F>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD><D1BE><EFBFBD>ע<EFBFBD><D7A2>
|
2024-11-13 18:01:18 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
instance = this;
|
2024-11-13 21:45:48 +08:00
|
|
|
|
EggNum.instance.eggNumText.text=Money.ToString();
|
2024-11-13 18:01:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool SetMoney(float add)
|
|
|
|
|
{
|
|
|
|
|
if (Money+add>=0)
|
|
|
|
|
{
|
2024-11-13 21:45:48 +08:00
|
|
|
|
float start = Money;
|
2024-11-13 18:01:18 +08:00
|
|
|
|
Money += add;
|
2024-11-13 21:45:48 +08:00
|
|
|
|
EggNum.instance.SetEggNumText(start);
|
2024-11-13 18:01:18 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
Debug.Log("Ǯ<><C7AE><EFBFBD><EFBFBD>");
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|