Ejemplo n.º 1
0
 private void AddPlayerProjectile(Vector2 position)
 {
     Projectile projectile = new Projectile();
     projectile.Initialize(this.ScreenManager.GraphicsDevice.Viewport, this.projectileTexture, position, this.player);
     this.projectiles.Add(projectile);
     SoundCaller shotFired = new SoundCaller(this.shotSound);
 }
Ejemplo n.º 2
0
        private void AddTurretProjectile(Turret tur)
        {
            Projectile projectile = new Projectile();
            projectile.Initialize(this.ScreenManager.GraphicsDevice.Viewport, this.turretProjTexture, new Vector2(tur.Position.X, tur.Position.Y), tur);

            this.projectiles.Add(projectile);
            SoundCaller turretShotFired = new SoundCaller(this.turretSound);
        }
Ejemplo n.º 3
0
 private void AddExplosion(Vector2 position)
 {
     Animation explosion = new Animation();
     int explosionFrameCount = 12;
     explosion.Initialize(this.explosionTexture, position, this.explosionTexture.Width / explosionFrameCount, this.explosionTexture.Height, explosionFrameCount, 45, Color.White, 1f, false);
     this.explosions.Add(explosion);
     SoundCaller explosionSound = new SoundCaller(this.roachSmashed);
     //
 }