money and daycount ui added
This commit is contained in:
parent
d28a1947eb
commit
9e082537d8
4 changed files with 819 additions and 9 deletions
|
|
@ -1,15 +1,17 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class HouseController : MonoBehaviour {
|
||||
private int dayCount = 0;
|
||||
private int dayCount = 1;
|
||||
private static UnityEvent newDayEvent;
|
||||
public static UnityEvent NewDayEvent => newDayEvent;
|
||||
|
||||
public Canvas menu;
|
||||
public TextMeshProUGUI dayCountTextMeshProUGUI;
|
||||
|
||||
private void OnMouseDown() {
|
||||
toggleMenu();
|
||||
|
|
@ -21,7 +23,7 @@ public class HouseController : MonoBehaviour {
|
|||
|
||||
public void newDay() {
|
||||
dayCount++;
|
||||
Debug.Log("New day: " + dayCount);
|
||||
dayCountTextMeshProUGUI.text = dayCount.ToString();
|
||||
newDayEvent?.Invoke();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue