Пример #1
0
 private void CheatsManager_OnCheatUpdated(string key, CheatType cheatType)
 {
     if (key == "invincibility")
     {
         invincibility = CheatsManager.GetBool(key);
     }
 }
Пример #2
0
 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);
 }
Пример #3
0
        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();
        }
Пример #4
0
 private static bool IsInfiniteResourcesActive() => CheatsManager.GetBool(CheatsKey.keyInfiniteResources);
Пример #5
0
 public static bool IsCreationTimeToZeroActive()
 => CheatsManager.GetBool(CheatsKey.keySetCreationTimeToZero);
Пример #6
0
 private static bool IsFogDisabled() => CheatsManager.GetBool(CheatsKey.keyDisableFog);