53 lines
1.1 KiB
C#
53 lines
1.1 KiB
C#
|
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;
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|