public Nave_jogador(
            int jogador,
            Texture2D textura,
            Vector2 posicao,
            float angulo,
            GameWindow gw,
            ContentManager Content
            ) : base(
                textura,
                posicao,
                angulo,
                gw,
                Content)
        {
            morto = false;
            //    explosao = Content.Load<Texture2D>("explosao");

            texturaBarra  = Content.Load <Texture2D>("Barra");
            texturaEscudo = Content.Load <Texture2D>("Escudo");
            barra         = new Barra(texturaBarra);
            escudo        = new Escudo(texturaEscudo);

            this.jogador        = jogador;
            Nave_jogador.vidas  = 7;
            Nave_jogador.pontos = 0;
            hitBox = new Rectangle((int)posicao.X, (int)posicao.Y, textura.Width, textura.Height);
        }
Ejemplo n.º 2
0
        public NaveGabriel(Texture2D textura, Color cor, Vector2 posicao, float angulo, string nomeJogador,
                           short vidas, ulong pontos, GameWindow Stage, Texture2D texturaEscudo, SoundEffect Som,
                           Texture2D texturaTiro, Texture2D texturaBarra)
        {
            this.textura       = textura;
            this.cor           = cor;
            this.posicao       = posicao;
            this.angulo        = angulo;
            this.nomeJogador   = nomeJogador;
            this.vidas         = vidas;
            this.pontos        = pontos;
            this.Stage         = Stage;
            this.texturaEscudo = texturaEscudo;
            this.Som           = Som;
            this.texturaTiro   = texturaTiro;
            this.texturaBarra  = texturaBarra;

            barra  = new Barra(texturaBarra);
            escudo = new Escudo(texturaEscudo);

            posicao.X = Stage.ClientBounds.Width / 2 - textura.Width / 2;
            posicao.Y = Stage.ClientBounds.Height / 2 - textura.Height / 2;
        }