Add level selection system. Add levels upto jester

This commit is contained in:
WillJeynes
2026-08-27 10:49:57 +01:00
parent e24539fbb1
commit 0767961bc0
50 changed files with 5381 additions and 68 deletions
+12 -2
View File
@@ -8,14 +8,24 @@ namespace Utils
protected virtual void Awake()
{
if (Instance != null && Instance != this)
if (dontDestroyOnLoad() && Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this as T;
DontDestroyOnLoad(gameObject);
if (dontDestroyOnLoad())
{
DontDestroyOnLoad(gameObject);
}
}
protected virtual bool dontDestroyOnLoad()
{
return false;
}
}
}