1
Fork 0
mirror of https://github.com/Steffo99/beat-td.git synced 2024-11-23 15:54:18 +00:00
beat-td/Assets/Scripts/TextFromCost.cs

23 lines
535 B
C#
Raw Normal View History

2018-04-23 18:09:13 +00:00
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();
}
}