Exemplo n.º 1
0
            private void load(OsuColour colours, Framework.Game game)
            {
                Size = new Vector2(60);

                Child = new CircularContainer
                {
                    Masking          = true,
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = colours.Gray1,
                            Alpha            = 0.5f,
                        },
                        circularProgress = new CircularProgress
                        {
                            RelativeSizeAxes = Axes.Both,
                            InnerRadius      = 1
                        },
                        overlayCircle = new Circle
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            RelativeSizeAxes = Axes.Both,
                            Colour           = colours.Gray1,
                            Size             = new Vector2(0.9f),
                        },
                        icon = new SpriteIcon
                        {
                            Shadow = false,
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            Size   = new Vector2(15),
                            Icon   = FontAwesome.Solid.Times
                        },
                    }
                };

                bind();

                gameActive.BindTo(game.IsActive);
            }
Exemplo n.º 2
0
        static void Main()
        {
            // Configure debug mode
            FrameworkDebug.Enabled                 = false;
            FrameworkDebug.DrawColliders           = true;
            FrameworkDebug.PrintCollisionDetection = false;
            GameDebug.Enabled         = true;
            GameDebug.ShaderDisabled  = false;
            GameDebug.ImmediatelyPlay = false;
            GameDebug.UnDieable       = true;
            GameDebug.InitialPoints   = 1000;

            // Initialize the game
            var game = new Framework.Game();

            game.RegisterInputProvider(new Keymap());
            game.CreatePrimitiveWindow(VierportAnchor.Horizontal, "SpaceWar");
            game.ShowScene(GameDebug.ImmediatelyPlay ? (Scene) new PlayScene() : new MenuScene());
            game.Run();
        }