GlobalGameJame/Assets/Scripts/GuiManager.cs

46 lines
885 B
C#
Raw Normal View History

2020-02-01 17:17:29 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
2020-07-13 19:48:15 +00:00
using UnityEngine.Networking;
2020-02-01 17:17:29 +00:00
2020-07-13 19:48:15 +00:00
public class GuiManager : NetworkBehaviour
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;
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
}
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
}