2020-02-01 17:17:29 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
2021-08-17 16:42:47 +00:00
|
|
|
|
public class GuiManager : MonoBehaviour
|
2020-02-01 17:17:29 +00:00
|
|
|
|
{
|
|
|
|
|
public GameObject InteractIcon;
|
2020-02-01 18:49:53 +00:00
|
|
|
|
public Text Wood;
|
|
|
|
|
public Text Ammo;
|
2020-02-02 03:12:43 +00:00
|
|
|
|
public Image healthBar;
|
2020-02-02 12:11:38 +00:00
|
|
|
|
public Text waves;
|
2020-02-01 17:17:29 +00:00
|
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-01 21:54:57 +00:00
|
|
|
|
public void InteractVerifier(bool set, Sprite image = null)
|
2020-02-01 17:17:29 +00:00
|
|
|
|
{
|
|
|
|
|
InteractIcon.SetActive(set);
|
2020-02-01 21:54:57 +00:00
|
|
|
|
if (image != null)
|
|
|
|
|
{
|
|
|
|
|
InteractIcon.GetComponent<Image>().sprite = image;
|
|
|
|
|
}
|
2020-02-01 17:17:29 +00:00
|
|
|
|
}
|
2020-02-02 03:12:43 +00:00
|
|
|
|
|
|
|
|
|
public void SetHealth(float health)
|
|
|
|
|
{
|
|
|
|
|
healthBar.fillAmount = health;
|
|
|
|
|
}
|
2020-02-02 12:11:38 +00:00
|
|
|
|
|
|
|
|
|
public void setWave(int wave)
|
|
|
|
|
{
|
|
|
|
|
waves.text = "Wave: " + wave;
|
|
|
|
|
}
|
2020-02-01 17:17:29 +00:00
|
|
|
|
}
|