Exemplo n.º 1
0
        private void OnLoaded(Object sender, RoutedEventArgs routedEventArgs)
        {
            var flatRedBallControl = new FlatRedBallControl();

            _mainGame = new Game1(flatRedBallControl);
            var frbTab = AddTab(flatRedBallControl);

            frbTab.Title = "Game";

            StackPanel stackPanel = new StackPanel();

            stackPanel.Children.Add(new Button {
                Content = "asdf"
            });
            stackPanel.Children.Add(new Button {
                Content = "asdf2"
            });
            stackPanel.Children.Add(new Button {
                Content = "asdf3"
            });
            stackPanel.Children.Add(new Button {
                Content = "asdf4"
            });

            AddTab(stackPanel);

            PluginManager.Self.Initialize();
        }
Exemplo n.º 2
0
        public FlatRedBallGameBase(FlatRedBallControl frbControl)
        {
            mFrbControl = frbControl;
            // Get the starting size of the control and start listening
            // to its Resize events.
            _windowHandle           = frbControl.Handle;
            RenderWidth             = (Int32)frbControl.RenderSize.Width;
            RenderHeight            = (Int32)frbControl.RenderSize.Height;
            frbControl.SizeChanged += XnaControlOnSizeChanged;

            // Create the graphics device manager and set the delegate for initializing the graphics device
            Graphics = new GraphicsDeviceManager(this);
            Graphics.PreferMultiSampling = true;

            Graphics.SynchronizeWithVerticalRetrace = true;
            Graphics.PreparingDeviceSettings       += PreparingDeviceSettings;

            StartInitialization();

            Content.RootDirectory = "Content";
        }
Exemplo n.º 3
0
        public FlatRedBallGameBase(FlatRedBallControl frbControl)
        {
            mFrbControl = frbControl;
            // Get the starting size of the control and start listening
            // to its Resize events.
            _windowHandle = frbControl.Handle;
            RenderWidth = (Int32) frbControl.RenderSize.Width;
            RenderHeight = (Int32) frbControl.RenderSize.Height;
            frbControl.SizeChanged += XnaControlOnSizeChanged;

            // Create the graphics device manager and set the delegate for initializing the graphics device
            Graphics = new GraphicsDeviceManager(this);
            Graphics.PreferMultiSampling = true;

            Graphics.SynchronizeWithVerticalRetrace = true;
            Graphics.PreparingDeviceSettings += PreparingDeviceSettings;

            StartInitialization();

            Content.RootDirectory = "Content";
        }
Exemplo n.º 4
0
 public MainGame(FlatRedBallControl frbControl)
     : base(frbControl)
 {
 }
Exemplo n.º 5
0
 public MainGame(FlatRedBallControl frbControl)
     : base(frbControl)
 {
 }
Exemplo n.º 6
0
 public Game1(FlatRedBallControl frbControl)
     : base(frbControl)
 {
 }