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:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user