示例#1
0
        public override void Update(GameTime gameTime)
        {
            if (isDead)
            {
                return;
            }

            fire.Update(gameTime);
            if (fire.IsTime())
            {
                double angle = 0;
                for (int i = 0; i < 6; i++)
                {
                    GameObject newbullet = new EnemyBulletTest();

                    newbullet.Position = position;

                    Vector2 velo = new Vector2((float)Math.Cos(angle), (float)Math.Sin(angle));
                    newbullet.Velocity = velo * 150;

                    GamePlay.GetObjManager().AddToObjectWaitList(newbullet);

                    angle += 45;
                    isDead = true;
                }
            }

            position += velocity * (float)gameTime.ElapsedGameTime.TotalSeconds * Parameters.GameSpeed;

            CheckIsScreenOut();
        }
示例#2
0
 public EnemyBulletTest(EnemyBulletTest other)
     : this()
 {
 }