예제 #1
0
        //wings that support large wings need to define a behavior on transform - do they keep the large wings?
        private protected WingType(BehaviorOnTransform behaviorOnTransform, WingSizeChangeDelegate changeSizeText, WingShortDesc wingShortDesc, WingSingleDesc singleWingDesc,
                                   PluralPartDescriptor <WingData> longDesc, PlayerBodyPartDelegate <Wings> playerDesc, ChangeType <WingData> transform, RestoreType <WingData> restore)
            : base(WingParser(wingShortDesc), WingSingleParser(singleWingDesc), LongPluralHelper(longDesc), playerDesc, transform, restore)
        {
            _index = indexMaker++;
            wings.AddAt(this, _index);
            transformBehavior = behaviorOnTransform;

            this.wingShortDesc = wingShortDesc;

            this.wingSingleDesc = singleWingDesc;

            longPluralDesc = longDesc;

            canChangeSize = true;

            changeSizeStr = changeSizeText ?? throw new ArgumentNullException(nameof(changeSizeText));
        }
예제 #2
0
        private protected WingType(bool canFly,
                                   ShortPluralDescriptor shortDesc, SimpleDescriptor singleWingDesc, PluralPartDescriptor <WingData> longDesc, PlayerBodyPartDelegate <Wings> playerDesc,
                                   ChangeType <WingData> transform, RestoreType <WingData> restore) : base(PluralHelper(shortDesc), singleWingDesc, LongPluralHelper(longDesc), playerDesc, transform, restore)
        {
            _index = indexMaker++;
            wings.AddAt(this, _index);
            transformBehavior = canFly ? BehaviorOnTransform.CONVERT_TO_LARGE : BehaviorOnTransform.CONVERT_TO_SMALL;             //was wrong, caught in testing.

            wingShortDesc = (_, plural) => shortDesc(plural);

            wingSingleDesc = (_) => singleWingDesc();

            longPluralDesc = longDesc;

            canChangeSize = false;

            changeSizeStr = (x, y) => "";
        }
예제 #3
0
 internal FeatheredWings(HairFurColors defaultHair, BehaviorOnTransform behaviorOnTransform, WingSizeChangeDelegate changeSizeText, WingShortDesc wingShortDesc,
                         WingSingleDesc singleWingDesc, PluralPartDescriptor <WingData> longDesc, PlayerBodyPartDelegate <Wings> playerDesc, ChangeType <WingData> transform,
                         RestoreType <WingData> restore) : base(behaviorOnTransform, changeSizeText, wingShortDesc, singleWingDesc, longDesc, playerDesc, transform, restore)
 {
     defaultFeatherColor = defaultHair;
 }