Exemple #1
0
        public SimpleYieldModifyingFeature(string name, StaticFeatureResolver <T> resolver, YieldManager yieldManager,
                                           YieldModifierType type, double[] modifiers, TileYieldModifierPriority priority) :
            base(name, resolver)
        {
            switch (type)
            {
            case YieldModifierType.Addition:
                _modifier = new AdditionYieldModifer(yieldManager, modifiers);
                break;

            case YieldModifierType.Multiplication:
                _modifier = new MultiplicationYieldModifier(yieldManager, modifiers);
                break;

            default:
                throw new ArgumentException("Unknown modifier type");
            }
            Priority = priority;
        }
Exemple #2
0
 public YieldType(string name, YieldManager manager)
 {
     Key     = new Key(manager.Key, name);
     Manager = manager;
     Index   = manager.Register(this);
 }