Add level selection system. Add levels upto jester
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user