コード例 #1
0
ファイル: ServerSettings.cs プロジェクト: zrisher/ARMS
        /// <exception cref="NullReferenceException">if setting does not exist or is of a different type</exception>
        public static T GetSetting <T>(SettingName name) where T : struct
        {
            ServerSettings    instance = Instance;
            SettingSimple <T> set      = instance.AllSettings[name] as SettingSimple <T>;

            return(set.Value);
        }
コード例 #2
0
ファイル: ServerSettings.cs プロジェクト: zrisher/ARMS
        private static void SetSetting <T>(SettingName name, T value) where T : struct
        {
            ServerSettings    instance = Instance;
            SettingSimple <T> set      = instance.AllSettings[name] as SettingSimple <T>;

            set.Value = value;
            Logger.AlwaysLog("Setting " + name + " = " + value, Rynchodon.Logger.severity.INFO);
        }