Exemplo n.º 1
0
        public IEnumerator<float> HeavyTortoise(GameObject go)
        {
            Enemy e = (Enemy)go;
            e.Rotation = (float)Math.PI / 2f * 3f;
            e.Health = 25f;
            e.LerpVelocity(65f, 8f);
            e.LerpRotation(e.Rotation + VectorMathHelper.GetAngleTo(e.Center, manager.thisScene.player.InnerHitbox.Center) / 2f, 12f);
            yield return 1.5f;

            BulletEmitter mainEmitter = new BulletEmitter(e, e.Center, false);
            mainEmitter.LockedToParentPosition = true;
            mainEmitter.LockPositionOffset = Vector2.Zero;
            yield return .01f;
            while(true)
            {
                int shots  = 0;
                while (shots < 20)
                {
                    if(manager.thisScene.PointOnScreen(go.Center))
                        AudioManager.PlaySoundEffect(GameScene.Shot4Sound, .25f);

                    mainEmitter.FireBulletCluster(VectorMathHelper.GetAngleTo(mainEmitter.Center, manager.thisScene.player.InnerHitbox.Center), 1, 10f, 150f, 0f, Color.DeepSkyBlue);
                    shots++;
                    yield return .06f;
                }

                yield return 1.73f;
            }
        }
Exemplo n.º 2
0
        public IEnumerator<float> ClusterBombs(GameObject go)
        {
            Bullet thisBullet = (Bullet)go;
            thisBullet.LerpVelocity(0f, 3f);
            yield return 3f + (thisBullet.CustomValue1 * .6f);

            BulletEmitter explosion = new BulletEmitter(this, thisBullet.Center);

            AudioManager.PlaySoundEffect(GameScene.Shot1Sound, .7f, 0f);
            AudioManager.PlaySoundEffect(GameScene.Shot7Sound, .7f, 0f);
            explosion.FireBulletExplosion(6, 160f, Color.Lerp(Color.White, Color.DeepSkyBlue, .4f));
            explosion.FireBulletCluster(VectorMathHelper.GetAngleTo(thisBullet.Center, thisScene.player.InnerHitbox.Center), 3, 40f, 160f, 40f, Color.Lerp(Color.White, Color.DeepSkyBlue, .4f), BulletType.Circle);
            explosion.FireBulletCluster(VectorMathHelper.GetAngleTo(thisBullet.Center, thisScene.player.InnerHitbox.Center), 4, 50f, 140f, 50f, Color.Lerp(Color.White, Color.DeepSkyBlue, .4f), BulletType.CircleSmall);
            explosion.Destroy();

            thisBullet.Destroy();
        }
Exemplo n.º 3
0
        public IEnumerator<float> BulletFountain(GameObject go)
        {
            BulletEmitter thisEmitter = new BulletEmitter(go, go.Center, false);
            thisEmitter.LockedToParentPosition = true;
            thisEmitter.LockPositionOffset = Vector2.Zero;

            yield return go.CustomValue1;
            float timeToFire = go.CustomValue2;

            float startTime = manager.thisScene.currentGameTime;
            while (manager.thisScene.currentGameTime < startTime + timeToFire)
            {
                if(manager.thisScene.PointOnScreen(go.Center))
                    AudioManager.PlaySoundEffect(GameScene.Shot4Sound, .1f, -.3f);

                thisEmitter.FireBulletCluster(VectorMathHelper.GetAngleTo(go.Center, manager.thisScene.player.InnerHitbox.Center), 1, 10f, (float)Math.Max(100, go.CustomValue3), 0f, Color.DeepSkyBlue);
                yield return .06f;
            }
        }
Exemplo n.º 4
0
        // CustomValue1: Initial wait time
        // CustomValue2: Number of shots per barrage
        // CustomValue3: Wait time between shots
        // CustomValue4: Wait time between barrages
        public IEnumerator<float> TortoiseBarage(GameObject go)
        {
            // Wait custom value 1 seconds
            yield return go.CustomValue1;

            BulletEmitter be = new BulletEmitter(go, go.Center);
            while (true)
            {
                int shots = 0;
                while (shots < go.CustomValue2)
                {
                    shots++;
                    be.Center = go.Center;
                    be.FireBulletCluster(go.Rotation, 1, 35f, 140f, 40f, Color.DeepSkyBlue);
                    AudioManager.PlaySoundEffect(GameScene.Shot4Sound, .12f);
                    yield return go.CustomValue3;
                }

                yield return go.CustomValue4;
            }
        }