Пример #1
0
 private void CheatsManager_OnCheatUpdated(string key, CheatType cheatType)
 {
     if (key == "invincibility")
     {
         invincibility = CheatsManager.GetBool(key);
     }
 }
Пример #2
0
            /// copied from the original, accept always sets gameplayCheatsRecognized_ to true so they always work
            private static bool Prefix(CheatsManager __instance)
            {
                __instance.gameplayCheatsRecognized_ = true;
                __instance.UpdateEnabledFlags();
                __instance.anyGameplayCheatsUsedThisLevel_ = __instance.AnyGameplayCheatsCurrentlyUsed_;

                // always skip the method so this is the replacement method
                return(false);
            }
Пример #3
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);
 }
Пример #4
0
 private void Awake()
 {
     if (_self == null)
     {
         _self = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Пример #6
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();
        }
Пример #7
0
 private static bool IsInfiniteResourcesActive() => CheatsManager.GetBool(CheatsKey.keyInfiniteResources);
Пример #8
0
 public static void ToggleCreationTimeToZeroActive()
 => CheatsManager.ToggleBool(CheatsKey.keySetCreationTimeToZero);
Пример #9
0
 public static bool IsCreationTimeToZeroActive()
 => CheatsManager.GetBool(CheatsKey.keySetCreationTimeToZero);
Пример #10
0
 void Toggle_FogOfWar()
 {
     CheatsManager.ToggleBool(CheatsKey.keyDisableFog);
 }
Пример #11
0
 private static bool IsFogDisabled() => CheatsManager.GetBool(CheatsKey.keyDisableFog);
Пример #12
0
        void Toggle_InfiniteResources()
        {
            bool cheatActive = IsInfiniteResourcesActive();

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