Exemplo n.º 1
0
        /* Fire a new Projectile*/
        public override Projectile FireProjectile(Vector2 position)
        {
            projectileTexture = textureManager.Instance.useTexture("laser");
            soundManager.Instance.PlaySound("Laser_Shoot");

            Projectile bullet = new laser(projectileTexture,
                    new Vector2(projectileTexture.Width / 2, projectileTexture.Height / 2),
                    new Vector2(position.X, position.Y - 32),
                    new Rectangle(0, 0, projectileTexture.Width, projectileTexture.Height));            

            if (bullet != null)
            {
                return bullet;
            }

            return null;
        }
Exemplo n.º 2
0
        /* Fire a new Projectile*/
        public override Projectile FireProjectile(Vector2 position)
        {
            projectileTexture = textureManager.Instance.useTexture("laser");
            soundManager.Instance.PlaySound("Laser_Shoot");

            Projectile bullet = new laser(projectileTexture,
                                          new Vector2(projectileTexture.Width / 2, projectileTexture.Height / 2),
                                          new Vector2(position.X, position.Y - 32),
                                          new Rectangle(0, 0, projectileTexture.Width, projectileTexture.Height));

            if (bullet != null)
            {
                return(bullet);
            }

            return(null);
        }