mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-23 07:44:19 +00:00
22 lines
535 B
C#
22 lines
535 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TextFromCost : MonoBehaviour {
|
|
|
|
TowerSelector towerSelector;
|
|
GameStatus gameStatus;
|
|
Text text;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
towerSelector = GetComponentInParent<TowerSelector>();
|
|
text = GetComponent<Text>();
|
|
gameStatus = GetComponentInParent<GameStatus>();
|
|
}
|
|
|
|
void Update () {
|
|
text.text = gameStatus.towerCosts[towerSelector.index].ToString();
|
|
}
|
|
}
|