protected ConBase(string name, string helpString, ConFlag flags = ConFlag.None) { this.name = name; this.helpString = helpString; this.flags = flags; ConManager.Register(this); }
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; } }
/// <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) { }