DayController.cs started implementation

This commit is contained in:
s-prechtl 2022-05-06 09:43:02 +02:00
parent 84c1b1f2df
commit 5320e65356
3 changed files with 52 additions and 3 deletions

View file

@ -0,0 +1,25 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class DayController : MonoBehaviour {
private int dayCount = 0;
private static UnityEvent newDayEvent;
private void OnMouseDown() {
newDay();
}
void Start() {
newDayEvent ??= new UnityEvent();
newDayEvent.AddListener(newDay);
}
private void newDay() {
dayCount++;
newDayEvent?.Invoke();
}
}