Exemplo n.º 1
0
        public GameOver(Game game)
            : base(game)
        {
            Rectangle rect = game.Window.ClientBounds;

            Container = new Canvas(new Point(rect.X, rect.Y), new Point(rect.Width, rect.Height));

            Container.AddChildren(new Label(String.Empty, "fonts/DefaultFont")
            {
                PercentPosition = new Vector2(.5f, .5f), HorizontalOrigin = HorizontalAlign.Center, VerticalOrigin = VerticalAlign.Middle, Color = Color.Black
            });
            Container.AddChildren(new Label("(Press START or ENTER to go back to the Main Menu)", "fonts/DefaultFont")
            {
                PercentPosition = new Vector2(.5f, .55f), HorizontalOrigin = HorizontalAlign.Center, VerticalOrigin = VerticalAlign.Middle, Color = Color.Black
            });
        }
Exemplo n.º 2
0
        public Controls(Game game)
            : base(game)
        {
            Rectangle rect = game.Window.ClientBounds;

            Container = new Canvas(new Point(rect.X, rect.Y), new Point(rect.Width, rect.Height));

            Container.AddChildren(new Image("images/controls.png")
            {
                Position = new Point(0, 0)
            });
        }
Exemplo n.º 3
0
        public TitleScreen(Game game)
            : base(game)
        {
            Rectangle rect = game.Window.ClientBounds;

            Container = new Canvas(new Point(rect.X, rect.Y), new Point(rect.Width, rect.Height));

            Container.AddChildren(new Image("images/title.png")
            {
                Position = new Point(0, 0)
            });
            Container.AddChildren(new Label("Press START or ENTER to play", "fonts/DefaultFont")
            {
                PercentPosition = new Vector2(.5f, .5f), HorizontalOrigin = HorizontalAlign.Center, VerticalOrigin = VerticalAlign.Middle, Color = Color.White
            });
            Container.AddChildren(new Label("Diogo Muller de Miranda", "fonts/DefaultFont")
            {
                PercentPosition = new Vector2(.5f, .9f), HorizontalOrigin = HorizontalAlign.Center, VerticalOrigin = VerticalAlign.Middle, Color = Color.White
            });
            Container.AddChildren(new Label("Tileset by Melanie Young Yee - Music by Kevin MacLeod", "fonts/DefaultFont")
            {
                PercentPosition = new Vector2(.5f, .95f), HorizontalOrigin = HorizontalAlign.Center, VerticalOrigin = VerticalAlign.Middle, Color = Color.White
            });
        }