Ejemplo n.º 1
0
 public CVar(string name, string defaultValue)
     : this(name, CVarType.String)
 {
     this.Value     = defaultValue;
     m_defaultValue = m_value;
     Register();
 }
Ejemplo n.º 2
0
 public CVar(string name, float defaultValue)
     : this(name, CVarType.Float)
 {
     this.FloatValue = defaultValue;
     m_defaultValue  = m_value;
     Register();
 }
Ejemplo n.º 3
0
 public CVar(string name, int defaultValue)
     : this(name, CVarType.Integer)
 {
     this.IntValue  = defaultValue;
     m_defaultValue = m_value;
     Register();
 }
Ejemplo n.º 4
0
 public CVar(string name, bool defaultValue)
     : this(name, CVarType.Boolean)
 {
     this.IntValue  = defaultValue ? 1 : 0;
     m_defaultValue = m_value;
     Register();
 }
Ejemplo n.º 5
0
 public bool Equals(ref CValue other)
 {
     return(other.intValue == intValue &&
            other.floatValue == floatValue &&
            other.stringValue == stringValue);
 }
Ejemplo n.º 6
0
 public CVar(string name, string defaultValue, CFlags flags = CFlags.None)
     : this(name, CVarType.String, flags)
 {
     this.Value     = defaultValue;
     m_defaultValue = m_value;
 }
Ejemplo n.º 7
0
 public CVar(string name, float defaultValue, CFlags flags = CFlags.None)
     : this(name, CVarType.Float, flags)
 {
     this.FloatValue = defaultValue;
     m_defaultValue  = m_value;
 }
Ejemplo n.º 8
0
 public CVar(string name, int defaultValue, CFlags flags = CFlags.None)
     : this(name, CVarType.Integer, flags)
 {
     this.IntValue  = defaultValue;
     m_defaultValue = m_value;
 }
Ejemplo n.º 9
0
 public CVar(string name, bool defaultValue, CFlags flags = CFlags.None)
     : this(name, CVarType.Boolean, flags)
 {
     this.IntValue  = defaultValue ? 1 : 0;
     m_defaultValue = m_value;
 }