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
+3 -11
View File
@@ -9,6 +9,9 @@ namespace Utils
public List<GuardData> guards;
public List<string> guardsmods;
public List<string> doorsmods;
public string introdialog;
public string globalmod;
}
[System.Serializable]
@@ -23,16 +26,5 @@ namespace Utils
{
public string type;
public string action;
public string GetName()
{
return action;
}
public string GetDescription()
{
return "Describe " + action;
}
}
}
+12
View File
@@ -27,5 +27,17 @@ namespace Utils
return item;
}
public static T GetTopAndRemove<T>(this List<T> list)
{
if (list.Count == 0)
return default;
T item = list[0];
list.RemoveAt(0);
return item;
}
}
}
+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;
}
}
}