コード例 #1
0
ファイル: Level2.cs プロジェクト: cmark89/AsteroidRebuttal
        public IEnumerator<float> FirstKomodo(GameObject go)
        {
            go.Rotation = (float)Math.PI / 2f;
            go.Velocity = 35f;
            yield return 1.5f;
            go.LerpVelocity(0f, 1.5f);
            yield return 1.5f;

            BulletEmitter emitter = new BulletEmitter(go, go.Center);
            while (true)
            {
                int shots = 0;
                while(shots < 10)
                {
                    shots++;

                    emitter.Rotation += .2f;
                    AudioManager.PlaySoundEffect(GameScene.Shot8Sound, .7f, .5f);
                    foreach(Bullet b in emitter.FireBulletExplosion(20, 200f, Color.DeepSkyBlue))
                    {
                        b.LerpVelocity(40f, 4f);
                    }

                    yield return .2f;
                }

                yield return 4f;
            }
        }
コード例 #2
0
ファイル: Level2.cs プロジェクト: cmark89/AsteroidRebuttal
        public IEnumerator<float> EasyTortoise(GameObject go)
        {
            if (go.CustomValue2 == 0)
                go.Rotation = (float)Math.PI / 2f;
            else
                go.Rotation = go.CustomValue2;
            go.Velocity = 75f;
            go.LerpVelocity(45f, 5f);

            yield return go.CustomValue1;
            while (true)
            {
                AudioManager.PlaySoundEffect(GameScene.Shot8Sound, .7f, 0f);
                new BulletEmitter(go, go.Center, true).FireBulletExplosion(12, 80f, Color.DeepSkyBlue);
                yield return 2f;
            }
        }
コード例 #3
0
ファイル: Level2.cs プロジェクト: cmark89/AsteroidRebuttal
 IEnumerator<float> ColumnDragonfly(GameObject go)
 {
     go.DrawAtTrueRotation = true;
     go.Rotation = ((float)Math.PI / 2) * 3;
     go.Velocity = 150f;
     yield return 1f;
     go.LerpVelocity(50f, 2f);
     yield return 2f;
     go.Rotation = VectorMathHelper.GetAngleTo(go.Center, manager.thisScene.player.InnerHitbox.Center);
     go.LerpVelocity(150f, 2f);
 }
コード例 #4
0
ファイル: Level3.cs プロジェクト: cmark89/AsteroidRebuttal
        public IEnumerator<float> SlowHomingBullet(GameObject go)
        {
            yield return 1.5f;

            AudioManager.PlaySoundEffect(GameScene.Shot8Sound, .3f, -.6f);
            go.LerpVelocity(0f, .5f);

            go.Rotation = VectorMathHelper.GetAngleTo(go.Center, manager.thisScene.player.InnerHitbox.Center);
            go.LerpVelocity(145f, 1.5f);
        }