Exemple #1
0
        internal EnumInCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
            : base(id, name, target, rawSettings)
        {
            Type enumType = typeof(T);

            if (!enumType.IsEnum)
            {
                throw new Exception("T must be an Enumeration type.");
            }

            RawSettings.ValueUIType = ValueUIType.ComboBox;
        }
        public ConditionDescriptionAttribute(Categories categories, string name, Enums.TargetType targetType, Type conditionType)
        {
            Description = new ConditionDescription
            {
                Category      = categories,
                Name          = name,
                TargetType    = targetType,
                ConditionType = conditionType,
            };

            if (!Description.ConditionType.InheritsOrImplements(typeof(ACondition)))
            {
                throw new ArgumentException("Condition Type must inherit from ACondition");
            }
        }
Exemple #3
0
        public CommandDescriptionAttribute(Categories categories, string name, Enums.TargetType targetType, Type inCommandType, Type outCommandType)
        {
            Description = new CommandDescription
            {
                Category       = categories,
                Name           = name,
                TargetType     = targetType,
                InCommandType  = inCommandType,
                OutCommandType = outCommandType,
            };

            if (Description.InCommandType != null && !Description.InCommandType.InheritsOrImplements(typeof(ACommand)))
            {
                throw new ArgumentException("In Command Type must inherit from ACommand");
            }

            if (Description.OutCommandType != null && !Description.OutCommandType.InheritsOrImplements(typeof(ACommand)))
            {
                throw new ArgumentException("Out Command Type must inherit from ACommand");
            }
        }
Exemple #4
0
 internal IntOutCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
     : base(id, name, target, new T(), rawSettings)
 {
 }
Exemple #5
0
 internal AValueCommand(int id, string name, Enums.TargetType target, MappingType mappingType, MappingSettings rawSettings)
     : base(id, name, target, mappingType, rawSettings)
 {
 }
Exemple #6
0
 internal OnOffInCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
     : base(id, name, target, rawSettings)
 {
 }
 internal EffectSelectorOutCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
     : base(id, name, target, rawSettings)
 {
 }
Exemple #8
0
 internal AValueInCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
     : base(id, name, target, MappingType.In, rawSettings)
 {
     RawSettings.ValueUIType = ValueUIType.ComboBox;
 }
Exemple #9
0
 internal TriggerInCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
     : base(id, name, target, MappingType.In, rawSettings)
 {
 }
Exemple #10
0
 internal FloatInCommand(int id, string name, Enums.TargetType target, MappingSettings rawSettings)
     : base(id, name, target, new T(), rawSettings)
 {
     RawSettings.ValueUIType = ValueUIType.Slider;
 }