示例#1
0
        public Credits(Game game)
            : base(game)
        {
            TextArea = new TextArea(game);
            TextArea.Text = "Desenvolvedores:\n"
                + "    Arthur Figueiredo\n"
                + "    Arthur Werneck\n"
                + "    Clewerton Coelho\n"
                + "    Diogo Honorato\n"
                + "    Humberto Anjos\n"
                + "\n\n"
                + "Professor:\n"
                + "    Cléber Tavares";
            TextArea.Background = Color.Gray;
            TextArea.Alpha = 128;
            Elements.Add(TextArea);

            Back = new Button(Game);
            Back.Text = "Back to MENU";
            Back.Size = new Vector2(ButtonWidth, ButtonHeight);
            Back.OnClick += (sender, args) => GetService<ISceneManagerService<MainGame.Scenes>>().GoTo(MainGame.Scenes.Menu);
            Elements.Add(Back);

            BackgroundImage = Game.Content.Load<Texture2D>("Textures/credits-background");
        }
示例#2
0
        protected override void LoadContent()
        {
            _arial = Game.Content.Load<SpriteFont>("arial");

            BackgroundImage = Game.Content.Load<Texture2D>("Textures/intro-background");

            Text = new TextArea(Game);
            Text.Text = "Clique em qualquer lugar para começar!";
            Text.Font = _arial;
            Elements.Add(Text);
        }