private void CheatsManager_OnCheatUpdated(string key, CheatType cheatType) { if (key == "invincibility") { invincibility = CheatsManager.GetBool(key); } }
void Start() { CheatsManager.SetBool((Cheat)null, false); CheatsManager.SetBool((string)null, false); CheatsManager.SetBool("hfqsdfk", false); CheatsManager.GetBool("hfqsdfk"); CheatsManager.GetBool(""); CheatsManager.GetBool((Cheat)null); CheatsManager.GetBool((string)null); }
void DrawCheat(Cheat cheat) { EditorGUILayout.BeginHorizontal(); // draw prefix string prefix = string.IsNullOrWhiteSpace(cheat.id) ? "ERROR: No cheat ID." : cheat.id; EditorGUILayout.PrefixLabel(prefix); // draw value switch (cheat.type) { case CheatType.Boolean: bool input = EditorGUILayout.Toggle(CheatsManager.GetBool(cheat)); CheatsManager.SetBool(cheat, input); break; default: Debug.LogError("Missing a value in DrawCheat(). Call your coder."); break; } EditorGUILayout.EndHorizontal(); }
private static bool IsInfiniteResourcesActive() => CheatsManager.GetBool(CheatsKey.keyInfiniteResources);
public static bool IsCreationTimeToZeroActive() => CheatsManager.GetBool(CheatsKey.keySetCreationTimeToZero);
private static bool IsFogDisabled() => CheatsManager.GetBool(CheatsKey.keyDisableFog);