Ejemplo n.º 1
0
 public override void Update(GameTime gameTime)
 {
     if ((int)gameTime.TotalGameTime.TotalSeconds % 5 == 0 && (int)gameTime.TotalGameTime.TotalSeconds != lastspecial)
     {
         lastspecial = (int)gameTime.TotalGameTime.TotalSeconds;
         BulletSpawner westspawner = new SpecialBulletSpawner(this, TextureManager.Textures.Get(TextureManager.Type.BulletGreen), this.Position, new CardinalMovement(4.0f, Movement.CardinalDirection.West), this.Width, this.Height, 1, 1, .05);
         this.NewSpawner.Invoke(westspawner, new AddSpawnerEventArgs(this, westspawner));
         BulletSpawner eastspawner = new SpecialBulletSpawner(this, TextureManager.Textures.Get(TextureManager.Type.BulletGreen), this.Position, new CardinalMovement(4.0f, Movement.CardinalDirection.East), this.Width, this.Height, 1, 1, .05);
         this.NewSpawner.Invoke(eastspawner, new AddSpawnerEventArgs(this, eastspawner));
     }
     base.Update(gameTime);
 }
Ejemplo n.º 2
0
        public override void Update(GameTime gameTime)
        {
            if ((int)gameTime.TotalGameTime.TotalSeconds % 5 == 0 && (int)gameTime.TotalGameTime.TotalSeconds != lastspecial)
            {
                lastspecial = (int)gameTime.TotalGameTime.TotalSeconds;
                BulletSpawner clockwise = new SpecialBulletSpawner(this, TextureManager.Textures.Get(TextureManager.Type.BulletGreen), this.Position, new SpiralMovement(3.5f), this.Width, this.Height, 3, 2, .05);
                this.NewSpawner.Invoke(clockwise, new AddSpawnerEventArgs(this, clockwise));
                BulletSpawner cclockwise = new SpecialBulletSpawner(this, TextureManager.Textures.Get(TextureManager.Type.BulletGreen), this.Position, new SpiralMovement(3.5f, true), this.Width, this.Height, 3, 2, .05);
                this.NewSpawner.Invoke(cclockwise, new AddSpawnerEventArgs(this, cclockwise));
            }

            base.Update(gameTime);
        }