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(); }
void Toggle_InfiniteResources() { bool cheatActive = IsInfiniteResourcesActive(); CheatsManager.SetBool(CheatsKey.keyInfiniteResources, !cheatActive); }