示例#1
0
 public GameDebugView(IGame game, KeyboardBindings keyboardBindings)
 {
     _game             = game;
     _keyboardBindings = keyboardBindings;
     _layer            = new AGSRenderLayer(AGSLayers.UI.Z - 1, independentResolution: new Size(1800, 1200));
     _inspector        = new InspectorPanel(game, _layer);
     _debugTree        = new GameDebugTree(game, _layer, _inspector);
     _displayList      = new GameDebugDisplayList(game, _layer);
     _input            = game.Input;
     keyboardBindings.OnKeyboardShortcutPressed.Subscribe(onShortcutKeyPressed);
 }
示例#2
0
 public GameDebugView(AGSEditor editor, KeyboardBindings keyboardBindings, ActionManager actions, GameToolbar toolbar)
 {
     _toolbar     = toolbar;
     _actions     = actions;
     _editor      = editor;
     _layer       = new AGSRenderLayer(AGSLayers.UI.Z - 1, independentResolution: _resolution);
     _inspector   = new InspectorPanel(editor, _layer, actions);
     Tree         = new GameDebugTree(editor, _layer, _inspector);
     _displayList = new GameDebugDisplayList(editor.Editor, editor.Game, _layer);
     _input       = editor.Editor.Input;
     keyboardBindings.OnKeyboardShortcutPressed.Subscribe(onShortcutKeyPressed);
 }
示例#3
0
        public GameCanvas(AGSEditor editor, GameToolbar toolbar, GameDebugTree tree)
        {
            _toolbar = toolbar;
            _tree    = tree;
            _editor  = editor;
            var canvasHitTest = new CanvasHitTest(editor);

            editor.CanvasHitTest = canvasHitTest;
            _menu                        = new CanvasMenu(editor, toolbar);
            _selectionMarker             = editor.Editor.Factory.Object.GetObject("SelectionMarker");
            _selectionMarker.Visible     = false;
            _selectionMarker.Border      = editor.Editor.Factory.Graphics.Borders.SolidColor(GameViewColors.HoveredText, 2f);
            _selectionMarker.RenderLayer = AGSLayers.UI;

            editor.Editor.State.UI.Add(_selectionMarker);
        }
示例#4
0
        public void SetGame(IGame game, IWindowInfo gameWindow, GameDebugTree tree)
        {
            _tree = tree;
            _windowInfo = gameWindow;
            _game = game;

            game.State.Viewport.PropertyChanged += onViewportPropertyChanged;
            setPosition();

            FPSCounter fps = new FPSCounter(game, _fpsLabel);
            fps.Start();

            MousePositionLabel mouseLabel = new MousePositionLabel(game, _mousePosLabel);
            mouseLabel.Start();

            HotspotLabel hotspot = new HotspotLabel(game, _hotspotLabel) { DebugMode = true };
            hotspot.Start();
        }