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"); }
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)); }
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); }
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); }
public Box(Rectangle area) { this.textura = Textura.GetTextura("texturaMenu"); this.area = area; }
private void NivelSucesso() { transacaoFinal.IniciarTransacao(); pause = true; texturaFinal = Textura.GetTextura("VoceVenceu"); nivelCompletado = true; }
private void NivelFracassado() { transacaoFinal.IniciarTransacao(); pause = true; texturaFinal = Textura.GetTextura("VocePerdeu"); }
public TexturaSpriteMovimentoAtaque(Textura textura, int colunas, int linhas) : base(textura, colunas, linhas) { }
private void AddTextura(ContentManager Content, string textura) { Textura texturaMenu = new Textura(textura, Content.Load<Texture2D>(CAMINHO_TEXTURAS + textura)); this.texturas.Add(texturaMenu); }
public Botao() { this.textura = Textura.GetTextura("texturaMenu"); }
public Cursor() { this.textura = Textura.GetTextura("texturaMenu"); }