Пример #1
0
        protected ConBase(string name, string helpString, ConFlag flags = ConFlag.None)
        {
            this.name       = name;
            this.helpString = helpString;
            this.flags      = flags;

            ConManager.Register(this);
        }
Пример #2
0
 public CvarEnum(string name, T defaultValue, string helpString = "", ConFlag flags = ConFlag.None) : base(name, defaultValue, helpString, flags)
 {
     if (!typeof(T).IsEnum)
     {
         Debug.LogErrorFormat("CVarEnum<{0}> is not a valid type because {0} is not defined as an Enum.", typeof(T).FullName);
         m_invalid = true;
     }
 }
Пример #3
0
 /// <summary>
 /// Checks if the provided <see cref="ConFlag"/> mask matches this object's.
 /// </summary>
 /// <param name="mask">The mask to match</param>
 /// <returns>True if it matches, otherwise false.</returns>
 public bool HasFlag(ConFlag mask)
 {
     return(flags.HasFlag(mask));
 }
 public CallbackCVarEnum(string name, T defaultValue, string helpString = "", ConFlag flags = ConFlag.None) : base(name, defaultValue, helpString, flags)
 {
 }