35 lines
632 B
C#
35 lines
632 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class PlayerInfo : MonoBehaviour
|
|||
|
{
|
|||
|
public static PlayerInfo instance;
|
|||
|
|
|||
|
public float Money = 1000;
|
|||
|
// Start is called before the first frame update
|
|||
|
void Start()
|
|||
|
{
|
|||
|
instance = this;
|
|||
|
}
|
|||
|
|
|||
|
public bool SetMoney(float add)
|
|||
|
{
|
|||
|
if (Money+add>=0)
|
|||
|
{
|
|||
|
Money += add;
|
|||
|
EggNum.instance.SetEggNumText();
|
|||
|
return true;
|
|||
|
}
|
|||
|
Debug.Log("Ǯ<><C7AE><EFBFBD><EFBFBD>");
|
|||
|
return false;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|