2024-11-13 18:01:18 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class PlayerInfo : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static PlayerInfo instance;
|
|
|
|
|
|
|
|
|
|
public float Money = 1000;
|
2024-11-15 23:31:54 +08:00
|
|
|
|
public int AllBetCoins;//<2F>ܹ<EFBFBD><DCB9><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()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|