House menu ui
This commit is contained in:
parent
4612938b54
commit
e9f4f3344b
5 changed files with 1020 additions and 33 deletions
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 8fd9111325ac85a439c0e1a896f8903d
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 7dcb0c75c1d32a949af7eb4303f3b6a6
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9a992c82c9da0cd4f8759894ddfd5fb3
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -4,14 +4,15 @@ using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
public class DayController : MonoBehaviour {
|
public class HouseController : MonoBehaviour {
|
||||||
private int dayCount = 0;
|
private int dayCount = 0;
|
||||||
private static UnityEvent newDayEvent;
|
private static UnityEvent newDayEvent;
|
||||||
public static UnityEvent NewDayEvent => newDayEvent;
|
public static UnityEvent NewDayEvent => newDayEvent;
|
||||||
|
|
||||||
|
public Canvas menu;
|
||||||
|
|
||||||
private void OnMouseDown() {
|
private void OnMouseDown() {
|
||||||
newDay();
|
toggleMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start() {
|
void Start() {
|
||||||
|
|
@ -20,8 +21,13 @@ public class DayController : MonoBehaviour {
|
||||||
newDayEvent.AddListener(newDay);
|
newDayEvent.AddListener(newDay);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void newDay() {
|
public void newDay() {
|
||||||
dayCount++;
|
dayCount++;
|
||||||
|
Debug.Log("New day: " + dayCount);
|
||||||
newDayEvent?.Invoke();
|
newDayEvent?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void toggleMenu() {
|
||||||
|
menu.gameObject.SetActive(!menu.gameObject.activeSelf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue