public void AddActions(Scene scene)
        {
            _patternManager = BulletPatternBuilder.GetInstance();

            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-3, 13)).SetEnemyColor("yellow")
                .SetDropItem(DropItemType.Powerup, 100).SetAngle(-90).SetSpeed(16)
                .SetActionTime(120).SetSpeedOffset(-8)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .AddAction()
                .SetSpeed(0).SetSpeedOffset(0)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(3, 13)).SetEnemyColor("cyan")
                .SetDropItem(DropItemType.Health, 100).SetAngle(-90).SetSpeed(16)
                .SetActionTime(120).SetSpeedOffset(-8)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .AddAction()
                .SetSpeed(0).SetSpeedOffset(0)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .Build()
                );
        }
        public void AddActions(Scene scene)
        {
            _patternManager = BulletPatternBuilder.GetInstance();

            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-5, 13)).SetEnemyColor("cyan")
                .SetDropItem(DropItemType.None).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("magenta")
                .SetDropItem(DropItemType.None).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(5, 13)).SetEnemyColor("yellow")
                .SetDropItem(DropItemType.None).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
        }
Exemple #3
0
        public void AddActions(Scene scene)
        {
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("yellow").SetHealth(50000)
                .SetAngle(-90).SetSpeed(16).SetSpeedOffset(-8).SetPrefabName("Boss")
                .SetActionTime(120)    //.AddPattern(_patternManager.GetPattern("never_shoot"))
                .AddAction().SetHealthThreshold(0.8f).SetSpeed(0)
                .AddPattern("random_shooting")
                .AddPattern("random_shooting")
                .AddPattern("random_shooting")
                .AddPattern("chop_boss")
                .AddAction().SetHealthThreshold(0.6f).SetSpeed(0)
                .AddPattern("backward_shooting")
                .AddAction().SetHealthThreshold(0.3f).SetSpeed(0)
                .AddPattern("backward_ring")
//                    .AddPattern("7_way_acc")
//                    .AddAction().SetHealthThreshold(0.2f).SetSpeed(0)
//                    .AddPattern("4_way_spiral")
//                    .AddAction().SetSpeed(0)
//                    .AddPattern("4_way_spiral_acc")
//                    .AddPattern("p000")
                .Build()
                );
        }
Exemple #4
0
        public void AddActions(Scene scene)
        {
            _patternManager = BulletPatternBuilder.GetInstance();
            // build a action queue for shooter using AddAction()
//            scene.AddAction(
//                SceneActionBuilder.NewAction()
//                    .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("magenta") // "cyan" "yellow" or "magenta"
//                    .SetDropItem(DropItemType.None).SetAngle(-90).SetSpeed(16)                     // this shooter will use a 16 speed at first
//                    .SetActionTime(120).SetSpeedOffset(-8) // then stops when its speed equals 0 (2 sec).
//                    .AddPattern(_patternManager.GetPattern("never_shoot"))
//                    .AddAction() // as soon as the speed goes to 0, its action
//                    .SetSpeed(0).SetSpeedOffset(0) // changes to this one, which stay still in its
//                    .AddPattern(_patternManager.GetPattern("never_shoot")) // position.
//                    .Build() // you can also make it moving slowly by adding
//            ); // a small speed offset value

            // template remember to comment it after use

//            scene.AddAction(
//                SceneActionBuilder.NewAction()
//                    .Build());
//
//            SceneActionBuilder.AddSequence(
//                scene,
//                SceneActionBuilder.NewAction().Build(),
//                15);

            // Scene Design

            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetRandomEnterPosition(new Vector2(-8, 8), new Vector2(13, 13)).SetEnemyColor("cyan")
                .SetSpeed(8).SetSpeedOffset(-1)
                .AddPattern("aim_once_after_1s").SetShootProbability(0.2f)
                .Build(),
                number: 20,
                intervalRange: new Vector2(15, 30));

            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-9, -1)).SetAngle(75).SetAngleOffset(-20).SetSpeed(6)
                .SetEnemyColor("magenta").AddPattern("1_way_aiming_randomized_CD")
                .SetDelay(8 * 60).Build(),
                40, 15);

            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(9, 0)).SetAngle(105).SetAngleOffset(20).SetSpeed(6)
                .SetEnemyColor("magenta").AddPattern("1_way_aiming_randomized_CD")
                .SetDelay(10 * 60).Build(),
                40, 15);

            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-9, 13)).SetAngle(-45).SetSpeed(8).SetSpeedOffset(-1)
                .SetEnemyColor("yellow").AddPattern("2_way_spiral_CD").AddPattern("2_way_spiral_CD_0deg")
                .SetDelay(20 * 60)
                .Build());

            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(9, 13)).SetAngle(-135).SetSpeed(8).SetSpeedOffset(-1)
                .SetEnemyColor("cyan").AddPattern("2_way_spiral_CD").AddPattern("2_way_spiral_CD_0deg")
                .SetDelay(20 * 60)
                .Build());

            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetRandomEnterPosition(new Vector2(-8, 8), new Vector2(13, 13)).SetRandomEnemyColor()
                .SetSpeed(9).SetSpeedOffset(-.5f)
                .AddPattern("aim_once_after_1s").SetShootProbability(0f)
                .SetDelay(26 * 60)
                .Build(),
                number: 30,
                intervalRange: new Vector2(15, 30));
        }
Exemple #5
0
        public void AddActions(Scene scene)
        {
            _patternManager = BulletPatternBuilder.GetInstance();
            // build a action queue for shooter using AddAction()
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("magenta") // "cyan" "yellow" or "magenta"
                .SetDropItem(DropItemType.None).SetAngle(-90).SetSpeed(16)     // this shooter will use a 16 speed at first
                .SetActionTime(120).SetSpeedOffset(-8)                         // then stops when its speed equals 0 (2 sec).
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .AddAction()                                                   // as soon as the speed goes to 0, its action
                .SetSpeed(0).SetSpeedOffset(0)                                 // changes to this one, which stay still in its
                .AddPattern(_patternManager.GetPattern("never_shoot"))         // position.
                .Build()                                                       // you can also make it moving slowly by adding
                );                                                             // a small speed offset value


            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-7, 13)).SetEnemyColor("cyan")
                .SetDropItem(DropItemType.Powerup, 100).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-3, 13)).SetEnemyColor("cyan")
                .SetDropItem(DropItemType.Powerup, 100).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(3, 13)).SetEnemyColor("yellow")
                .SetDropItem(DropItemType.Health, 100).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(7, 13)).SetEnemyColor("yellow")
                .SetDropItem(DropItemType.Health, 100).SetAngle(-90)
                .SetSpeed(5)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(6, 13)).SetEnemyColor("magenta")
                .SetAngle(-90).SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("aim_once_after_2s"))
                .SetDelay(6 * 60).Build(),
                25,
                12
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-10, 4)).SetEnemyColor("cyan")
                .SetAngle(0).SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("aim_once_after_2s"))
                .SetDelay(12 * 60).Build(),
                25,
                12
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(7, 13)).SetEnemyColor("magenta")
                .SetAngle(-90)
                .SetAngleOffset(-40)
                .SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("p002"))
                .SetDelay(19 * 60)
                .Build(),
                45,
                10
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-5, 13))
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p006"))
                .SetDelay(28 * 60)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(5, 13)).SetEnemyColor("cyan")
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p006"))
                .SetDelay(28 * 60)
                .Build()
                );
        }
Exemple #6
0
        public void AddActions(Scene scene)
        {
            _patternManager = BulletPatternBuilder.GetInstance();


            // build a action queue for shooter using AddAction()
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("cyan")            // "cyan" "yellow" or "magenta", default to "magenta" if unspecified
                .SetAngle(-90).SetSpeed(16)                                            // this shooter will use a 16 speed at first
                .SetActionTime(120).SetSpeedOffset(-8)                                 // then stops when its speed equals 0 (2 sec).
                .AddPattern(_patternManager.GetPattern("never_shoot"))
                .AddAction()                                                           // as soon as the speed goes to 0, its action
                .SetSpeed(0).SetSpeedOffset(0)                                         // changes to this one, which stay still in its
                .AddPattern(_patternManager.GetPattern("never_shoot"))                 // position.
                .Build()                                                               // you can also make it moving slowly by adding
                );                                                                     // a small speed offset value


            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-7, 13))
                .SetAngle(-90)
                .SetSpeed(7)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-3, 13))
                .SetAngle(-90)
                .SetSpeed(7)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(3, 13))
                .SetAngle(-90)
                .SetSpeed(7)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(7, 13))
                .SetAngle(-90)
                .SetSpeed(7)
                .AddPattern(_patternManager.GetPattern("p001"))
                .Build()
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(7, 13)).SetEnemyColor("yellow")
                .SetAngle(-90)
                .SetAngleOffset(-40)
                .SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("p002"))
                .SetDelay(2 * 60)
                .Build(),
                45,
                10
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-7, 13)).SetEnemyColor("yellow")
                .SetAngle(-90)
                .SetAngleOffset(40)
                .SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("p002"))
                .SetDelay(2 * 60)
                .Build(),
                45,
                10
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13))
                .SetAngle(-90)
                .SetSpeed(6)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p007"))
                .SetDelay(720)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-5, 13)).SetEnemyColor("cyan")
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p006"))
                .SetDelay(960)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(5, 13)).SetEnemyColor("cyan")
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p006"))
                .SetDelay(960)
                .Build()
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-7, 13))
                .SetAngle(-90)
                .SetAngleOffset(40)
                .SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("p007_partial_destroyable"))
                .SetDelay(1400)
                .Build(),
                45,
                10
                );
            SceneActionBuilder.AddSequence(
                scene,
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(7, 13))
                .SetAngle(-90)
                .SetAngleOffset(-40)
                .SetSpeed(10)
                .AddPattern(_patternManager.GetPattern("p007_partial_destroyable"))
                .SetDelay(1400)
                .Build(),
                45,
                10
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-7, 13))
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p003")).SetEnemyColor("yellow")
                .SetDelay(2050)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(7, 13))
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p003"))
                .SetDelay(2050)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(-5, 13)).SetEnemyColor("cyan")
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p004"))
                .SetDelay(2400)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(5, 13)).SetEnemyColor("cyan")
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p004"))
                .SetDelay(2400)
                .Build()
                );
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("yellow")
                .SetAngle(-90)
                .SetSpeed(8)
                .SetSpeedOffset(-2)
                .AddPattern(_patternManager.GetPattern("p005"))
                .SetDelay(2800)
                .Build()
                );

            // this one should be the miniboss
            scene.AddAction(
                SceneActionBuilder.NewAction()
                .SetEnterPosition(new Vector2(0, 13)).SetEnemyColor("cyan").SetHealth(36000)
                .SetAngle(-90).SetSpeed(16).SetSpeedOffset(-8).SetPrefabName("Boss")
                .SetActionTime(120)                //.AddPattern(_patternManager.GetPattern("never_shoot"))
                .SetDelay(50 * 60)
                .AddChild(
                    SceneActionBuilder.NewAction()
                    .SetEnterPosition(new Vector2(2.5f, 13)).SetEnemyColor("yellow").SetHealth(3000)
                    .SetAngle(-90).SetSpeed(16).SetSpeedOffset(-8).SetPrefabName("BossWing")
                    .SetActionTime(120).SetDelay(50 * 60).SetDropItem(DropItemType.Health, 100)
                    .AddAction().AddPattern(_patternManager.GetPattern("p000")).SetSpeed(3)
                    .SetAngleOffset(30).SetAngle(90)
                    .Build())
                .AddChild(
                    SceneActionBuilder.NewAction()
                    .SetEnterPosition(new Vector2(-2.5f, 13)).SetEnemyColor("magenta").SetHealth(3000)
                    .SetAngle(-90).SetSpeed(16).SetSpeedOffset(-8).SetPrefabName("BossWing")
                    .SetActionTime(90).SetDelay(50 * 60).SetDropItem(DropItemType.Health, 100)
                    .AddAction().AddPattern(_patternManager.GetPattern("p000")).SetSpeed(3)
                    .SetAngleOffset(30).SetAngle(-90)
                    .Build())
                .AddAction().SetHealthThreshold(0.7f).SetSpeed(0)
                .AddPattern(_patternManager.GetPattern("8_way_blocking"))
                .AddAction().SetHealthThreshold(0.3f).SetSpeed(0)
                .AddPattern(_patternManager.GetPattern("4_way_spiral"))
                .AddAction().SetSpeed(0)
                .AddPattern(_patternManager.GetPattern("4_way_spiral_acc"))
                .AddPattern(_patternManager.GetPattern("p000"))
                .Build()
                );
        }