public static void AddBullet(string featureName)
        {
            BulletType    bullet  = (BulletType)Log.EnumPrompt(typeof(BulletType));
            BulletBuilder feature = new BulletBuilder(featureName, bullet);

            Action <BulletBuilder> add;

            switch (bullet)
            {
            case BulletType.BulletWithFireStrategy:
                add = AddBulletWithFireStrategy;
                break;

            case BulletType.AdditionalBullet:
                add = AddAdditionalBullet;
                break;

            default:
                throw new ArgumentException($"UNKNOWN BULLET {bullet}");
            }

            if (ConfirmFeature(feature, add.Method.Name))
            {
                add(feature);
            }
        }
        public static void AddBulletWithFireStrategy(BulletBuilder feature)
        {
            LogProgress("Bullet with FireStrategy", feature);

            AddFeatureWithPrefab(feature);
            PlayerFireStrategyBuilder strategy = new PlayerFireStrategyBuilder(feature.FeatureName);

            AddPlayerFireStrategy(strategy);
        }
Example #3
0
        public static void RunBulletTests(string featureName)
        {
            BulletBuilder CreateBullet(string nameSuffix, BulletType type)
            {
                string        name    = $"{featureName}{nameSuffix}";
                BulletBuilder feature = new BulletBuilder(name, type);

                return(feature);
            }

            BulletBuilder strategy = CreateBullet("WithStrategy", BulletType.BulletWithFireStrategy);

            AddBulletWithFireStrategy(strategy);

            BulletBuilder additional = CreateBullet("Additional", BulletType.AdditionalBullet);

            AddAdditionalBullet(additional);
        }
        public static void AddAdditionalBullet(BulletBuilder feature)
        {
            LogProgress("Additional Bullet", feature);

            AddFeatureWithPrefab(feature);
        }