start of Shop system
grrr
This commit is contained in:
parent
b21d392ff6
commit
56f0f8f30f
15 changed files with 4068 additions and 3 deletions
19
Assets/Scripts/Cost.cs
Normal file
19
Assets/Scripts/Cost.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using System;
|
||||
|
||||
public class Cost : MonoBehaviour
|
||||
{
|
||||
private int cost;
|
||||
[SerializeField] TextMeshProUGUI texteCout;
|
||||
[SerializeField] TextMeshProUGUI unit;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
cost = GlobalsVariable.prices[unit.text];
|
||||
texteCout.text = cost.ToString();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue