コード例 #1
0
ファイル: Principal.cs プロジェクト: rcdmk/o-sistema
        /// <summary>
        /// É responsável pelo carregamento do conteúdo do jogo, chamada apenas uma vez.
        /// </summary>
        protected override void LoadContent()
        {
            // Create o SpriteBatch para desenhar as texturas
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //carregando os sons
            Sons.LoadContent(Content);

            //Definindo as fontes
            Fontes.Menu            = Content.Load <SpriteFont>("Fonts\\bitstreamMenu");
            Fontes.MenuSelecionado = Fontes.Menu;
            Fontes.Score           = Content.Load <SpriteFont>("Fonts\\Score_Miramonte");
            Fontes.Creditos        = Content.Load <SpriteFont>("Fonts\\bitstreamCreditos");
            Fontes.TituloCreditos  = Fontes.Score;

            //Tela do logo
            telaLogo = new TelaLogo(this);
            telaLogo.Initialize();
            Components.Add(telaLogo);

            //Tela Inicial
            fundoInicial = Content.Load <Texture2D>("Telas\\tela_inicio");
            telaInicial  = new TelaInicio(this, fundoInicial);
            telaInicial.Initialize();
            Components.Add(telaInicial);


            //Tela Controles
            fundoControles = Content.Load <Texture2D>("Telas\\tela_inicio");
            controles      = Content.Load <Texture2D>("Telas\\telas_controles");
            telaControles  = new TelaControles(this, fundoControles, controles);
            telaControles.Initialize();
            Components.Add(telaControles);

            //Tela Jogo
            telaJogo = new TelaJogo(this);
            telaJogo.Initialize();
            Components.Add(telaJogo);

            //Tela Abertura
            telaAbertura = new TelaAbertura(this);
            telaAbertura.Initialize();
            Components.Add(telaAbertura);

            //Tela Creditos
            telaCreditos = new TelaCreditos(this);
            telaCreditos.Initialize();
            Components.Add(telaCreditos);

            ((TelaInicio)telaInicial).CriarMenu();

            //Iniciar a primeira tela
            telaLogo.Mostrar();
            telaAtual = telaLogo;

            base.LoadContent();
        }
コード例 #2
0
        private void lblCreditos_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            TelaCreditos f = new TelaCreditos();

            f.ShowDialog();
        }