mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-23 15:54:18 +00:00
23 lines
535 B
C#
23 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();
|
|||
|
}
|
|||
|
}
|