コード例 #1
0
        private void UnloadModData()
        {
            if (this.Data != null)
            {
                ModCustomDataFileHelpers.SaveAsJson <ModHelpersData>(this, "data", true, this.Data);
            }

            this.Data = new ModHelpersData();
        }
コード例 #2
0
        ////////////////

        private bool LoadModData()
        {
            var data = ModCustomDataFileHelpers.LoadJson <ModHelpersData>(this, "data");

            if (data != null)
            {
                this.Data = data;
                return(true);
            }

            return(false);
        }
コード例 #3
0
        ////////////////

        private bool LoadModData()
        {
            bool success;
            var  data = DataFileHelpers.LoadJson <ModHelpersData>(this, "data", out success);

            if (success && data != null)
            {
                this.Data = data;
            }

            return(success);
        }
コード例 #4
0
        private void UnloadModData()
        {
            DataFileHelpers.SaveAsJson <ModHelpersData>(this, "data", this.Data);

            this.Data = new ModHelpersData();
        }