mirror of
https://github.com/ConjureETS/Human-Farm-Tycoon.git
synced 2026-03-24 10:21:06 +00:00
New Class: Stats (Main class storing our variables for our resources) Added some buttons and text fields to the scene to show off the functionality of our Stats class.
30 lines
587 B
C#
30 lines
587 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEngine.UI;
|
|
|
|
public class RessourceView: MonoBehaviour{
|
|
|
|
private RessourceController rc;
|
|
public Text corpseText;
|
|
public Text rockText;
|
|
public Text woodText;
|
|
public Text meatText;
|
|
|
|
void Start()
|
|
{
|
|
Stats stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
|
|
rc = new RessourceController(stats, corpseText, rockText, woodText, meatText);
|
|
setResources();
|
|
}
|
|
|
|
public void setResources() {
|
|
rc.UpdateView();
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
|
|
}
|
|
}
|