Greatest Time simulation ever

Außerdem:
- Coole Singletons, möglicherweise die geilsten Singletons, die jemals in Unity implementiert wurden
- Utility Klassen nach Utility Verschoben
- Schlaganfallsymptome in Developer entfernt
This commit is contained in:
Simon Lübeß
2024-04-04 19:41:19 +02:00
parent 7947eab66e
commit 80e25e2d81
20 changed files with 353 additions and 145 deletions

View File

@ -3,14 +3,13 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Utility;
public class GameManager : MonoBehaviour
public class GameManager : MonoBehaviourSingleton<GameManager>
{
public static GameManager Instance { get; private set; }
[SerializeField]
private double _baseGameDurationSeconds = 10.0 * 60.0;
[SerializeField]
private double _remainingGameDurationSeconds = 0.0;
@ -40,19 +39,6 @@ public class GameManager : MonoBehaviour
public bool IsGameRunning => _gameRunning.IsTrue;
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Debug.LogError("GameManager already exists. Deleting duplicate.");
Destroy(gameObject);
}
}
private void Start()
{
StartGame();