2024-10-30 21:49:13 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
public class AssestPanel : MonoBehaviour
|
|
|
|
{
|
|
|
|
public static AssestPanel instance;
|
|
|
|
|
|
|
|
public Text Stone;
|
|
|
|
public Text Coin;
|
|
|
|
public Text Ore;
|
|
|
|
public Text Forging;
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
|
|
|
2024-10-30 21:49:13 +08:00
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
instance = this;
|
|
|
|
Stone.text = PlayerManager.Instance.Stones.ToString();
|
|
|
|
Forging.text=PlayerManager.Instance.Forging.ToString();
|
|
|
|
Coin.text=PlayerManager.Instance.Coins.ToString();
|
|
|
|
Ore.text=PlayerManager.Instance.Ore.ToString();
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
|
|
|
2024-10-30 21:49:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public void SetStoneText(float num)
|
|
|
|
{
|
|
|
|
if (Stone!=null)
|
|
|
|
{
|
|
|
|
Stone.text=num.ToString();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
public void SetCoinText(float num)
|
|
|
|
{
|
|
|
|
if (Coin != null)
|
|
|
|
{
|
|
|
|
Coin.text = num.ToString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void SetOreText(float num)
|
|
|
|
{
|
|
|
|
if (Ore != null)
|
|
|
|
{
|
|
|
|
Ore.text = num.ToString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void SetForgingText(float num)
|
|
|
|
{
|
|
|
|
if (Forging != null)
|
|
|
|
{
|
|
|
|
Forging.text = num.ToString();
|
|
|
|
}
|
|
|
|
}
|
2024-10-31 16:50:35 +08:00
|
|
|
|
|
|
|
|
2024-10-30 21:49:13 +08:00
|
|
|
}
|