Exemplo n.º 1
0
        public Menu()
        {
            this.textura = Textura.GetTextura("texturaMenu2");
            this.fonte = Global.bancoDados.Fonte;
            this.fonte10 = Global.bancoDados.Fonte10;

            int alturaBotao = 32;
            int largurabotao = 130;
            int borda = 10;
            this.estadoMenu = EstadoMenu.MenuInicial;
            this.texturaFundo = Textura.GetTextura("PlanoFundo");

            CarregaPerfis();

            Botao botaoNovoPerfil = new Botao();
            botaoNovoPerfil.Area = new Rectangle(Global.LarguraJanela - largurabotao - borda, Global.AlturaJanela - (alturaBotao * 3) - borda - 4, largurabotao, alturaBotao);
            botaoNovoPerfil.NomeBotao = "Novo Perfil";
            botaoNovoPerfil.MouseClick += new System.EventHandler(this.Click_NovoPerfil);

            Botao botaoSobre = new Botao();
            botaoSobre.Area = new Rectangle(Global.LarguraJanela - largurabotao - borda, Global.AlturaJanela - (alturaBotao * 2) - borda - 2, largurabotao, alturaBotao);
            botaoSobre.NomeBotao = "Sobre";
            botaoSobre.MouseClick += new System.EventHandler(this.Click_Sobre);

            Botao botaoSair = new Botao();
            botaoSair.Area = new Rectangle(Global.LarguraJanela - largurabotao - borda, Global.AlturaJanela - alturaBotao - borda, largurabotao, alturaBotao);
            botaoSair.NomeBotao = "Sair";
            botaoSair.MouseClick += new System.EventHandler(this.Click_Sair);

            botoesPrincipal.Add(botaoNovoPerfil);
            botoesPrincipal.Add(botaoSobre);
            botoesPrincipal.Add(botaoSair);

            Botao botaoVoltar = new Botao();
            botaoVoltar.Area = new Rectangle(Global.LarguraJanela - largurabotao - borda, Global.AlturaJanela - alturaBotao - borda, largurabotao, alturaBotao);
            botaoVoltar.NomeBotao = "Voltar";
            botaoVoltar.MouseClick += new System.EventHandler(this.Click_Voltar);

            Botao botaoExcluirPerfil = new Botao();
            botaoExcluirPerfil.Area = new Rectangle(Global.LarguraJanela - largurabotao - borda, Global.AlturaJanela - (alturaBotao * 2) - borda - 2, largurabotao, alturaBotao);
            botaoExcluirPerfil.NomeBotao = "Excluir Perfil";
            botaoExcluirPerfil.MouseClick += new System.EventHandler(this.Click_ExcluirPerfil);

            boxSobre = new Box(new Rectangle(10, 94, 360, 300));

            Botao botaoVoltarSobre = new Botao();
            botaoVoltarSobre.Area = new Rectangle(Global.LarguraJanela - largurabotao - borda, Global.AlturaJanela - alturaBotao - borda, largurabotao, alturaBotao);
            botaoVoltarSobre.NomeBotao = "Voltar";
            botaoVoltarSobre.MouseClick += new System.EventHandler(this.Click_Voltar);

            botoesSelecaoNiveis.Add(botaoVoltar);
            botoesSelecaoNiveis.Add(botaoExcluirPerfil);
            botoesSobre.Add(botaoVoltarSobre);

            textBoxNovoPerfil = new ItemTexto(40, 200, 300, 40);
            textBoxNovoPerfil.EnterKeyPressed += new System.EventHandler(this.ConfirmaNovoPerfil);
            textBoxNovoPerfil.EscKeyPressed += new System.EventHandler(this.CancelaNovoPerfil);

            logo = Textura.GetTextura("Logo");
        }
Exemplo n.º 2
0
 public BarraInformacoes()
 {
     this.textura = Textura.GetTextura("texturaMenu2");
     this.texturaOuro = Textura.GetTextura("Ouro");
     this.texturaVida = Textura.GetTextura("Vida");
     this.texturaRodada = Textura.GetTextura("Rodada");
     this.fonte = Global.bancoDados.Fonte;
     this.box = new Box(new Rectangle(0,0,Global.LarguraJanela,32));
 }
Exemplo n.º 3
0
 public MenuUnidade(Unidade unidade)
 {
     this.unidade = unidade;
     fundo = Textura.GetTextura("MenuUnidadeFundo");
     up = Textura.GetTextura("Up");
     gold = Textura.GetTextura("Ouro");
     int raiodif = (fundo.Textura2D.Width / 2) - 16;
     posicao = unidade.Posicao - new Vector2(raiodif, raiodif);
     centro = unidade.Centro;
     fonte = Global.bancoDados.FonteMenuUnidade;
     posicaoSell = centro - new Vector2(60, 30);
     posicaoUp = centro + new Vector2(25, -20);
     selecaoSell = new Rectangle((int)posicaoSell.X, (int)posicaoSell.Y, 40, 50);
     selecaoUp = new Rectangle((int)posicaoUp.X, (int)posicaoSell.Y, 40, 50);
 }
Exemplo n.º 4
0
        protected TexturaMovimento(Textura textura, int colunas, int linhas)
        {
            this.colunas = colunas;
            this.linhas = linhas;
            this.textura = textura;
            this.Posicao = new Vector2(0, 0);
            this.larguraFrame = textura.Textura2D.Width / colunas;
            this.alturaFrame = textura.Textura2D.Height / linhas;
            this.ExecutaAnimacao(Movimento.paradoBaixo);

            List<Rectangle> frames = new List<Rectangle>();

            // Cria todos os quadros da imagem
            for (int i = 0; i < linhas; i++)
                for (int j = 0; j < colunas; j++)
                    frames.Add(new Rectangle(j * larguraFrame,
                        i * alturaFrame, larguraFrame, alturaFrame));

            AddAnimacoes(frames);
        }
Exemplo n.º 5
0
 public Box(Rectangle area)
 {
     this.textura = Textura.GetTextura("texturaMenu");
     this.area = area;
 }
Exemplo n.º 6
0
        private void NivelSucesso()
        {
            transacaoFinal.IniciarTransacao();
            pause = true;
            texturaFinal = Textura.GetTextura("VoceVenceu");

            nivelCompletado = true;
        }
Exemplo n.º 7
0
 private void NivelFracassado()
 {
     transacaoFinal.IniciarTransacao();
     pause = true;
     texturaFinal = Textura.GetTextura("VocePerdeu");
 }
 public TexturaSpriteMovimentoAtaque(Textura textura, int colunas, int linhas)
     : base(textura, colunas, linhas)
 {
 }
Exemplo n.º 9
0
 private void AddTextura(ContentManager Content, string textura)
 {
     Textura texturaMenu = new Textura(textura, Content.Load<Texture2D>(CAMINHO_TEXTURAS + textura));
     this.texturas.Add(texturaMenu);
 }
Exemplo n.º 10
0
 public Botao()
 {
     this.textura = Textura.GetTextura("texturaMenu");
 }
Exemplo n.º 11
0
 public Cursor()
 {
     this.textura = Textura.GetTextura("texturaMenu");
 }