Пример #1
0
        private void AttemptResolve()
        {
            if (Engine.ScriptingInterface.IsCvarRegistered(Name))
            {
                Cvar cvar = Engine.ScriptingInterface.GetCvar(Name);

                if (typeof(CvarBase <T>).IsAssignableFrom(cvar.GetType()))
                {
                    value = (CvarBase <T>)cvar;
                }
            }
        }
Пример #2
0
 public CachedCvar(string name, T defaultValue)
 {
     this.Name         = name;
     this.DefaultValue = defaultValue;
     this.value        = null;
 }