コード例 #1
0
        public static bool GetBool(Cheat cheat)
        {
            if (cheat == null)
            {
                Debug.LogErrorFormat("Cheat is null. Aborting.");
                return(false);
            }

            if (cheat.type != CheatType.Boolean)
            {
                Debug.LogErrorFormat("Can't use GetBool() because {0} isn't a cheat of type boolean. Returning false", cheat.id);
                return(false);
            }

            return(GetBool(cheat.id));
        }
コード例 #2
0
        public static void SetBool(Cheat cheat, bool value)
        {
            if (cheat == null)
            {
                Debug.LogErrorFormat("Cheat is null. Aborting...");
                return;
            }

            if (cheat.type != CheatType.Boolean)
            {
                Debug.LogErrorFormat("Aborting SetBool() because {0} isn't a cheat of type boolean", cheat.id);
                return;
            }

            SetBool(cheat.id, value);
        }