Esempio n. 1
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);
 }
Esempio n. 2
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();
        }
Esempio n. 3
0
        void Toggle_InfiniteResources()
        {
            bool cheatActive = IsInfiniteResourcesActive();

            CheatsManager.SetBool(CheatsKey.keyInfiniteResources, !cheatActive);
        }