Add the ability to ask questions ABOUT the guards
This commit is contained in:
@@ -7,6 +7,8 @@ namespace Utils
|
||||
{
|
||||
public List<DoorData> doors;
|
||||
public List<GuardData> guards;
|
||||
public List<string> guardsmods;
|
||||
public List<string> doorsmods;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
|
||||
@@ -14,5 +14,18 @@ namespace Utils
|
||||
(list[i], list[j]) = (list[j], list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public static T GetRandomAndRemove<T>(this List<T> list)
|
||||
{
|
||||
if (list.Count == 0)
|
||||
return default;
|
||||
|
||||
int index = Random.Range(0, list.Count);
|
||||
T item = list[index];
|
||||
|
||||
list.RemoveAt(index);
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user