Ejemplo n.º 1
0
        public TDEEditor(GameWindow mGameWindow)
        {
            TDGameWindow = mGameWindow;
            _drawEntities = new List<TDEEntity>();
            _elementSprites = new List<Sprite>();
            _common = new TDCommon(mGameWindow);

            _currentOutline = TDEOutlines.GetOutlines().First();
            _rectangleMode = true;

            OnUpdate += mFrameTime =>
                        {
                            UpdateSelector();
                            UpdateInfoText();
                        };
            AddDrawAction(DrawEntities);

            _previewSpriteCount = 14;
            for (var i = 0; i < _previewSpriteCount; i++) _elementSprites.Add(new Sprite());

            OnDrawAfterDefault += DrawGUI;
            OnDrawBeforeCamera += _common.GUI.DrawBackground;

            InitializeInputs();
        }
Ejemplo n.º 2
0
        public TDGGame(GameWindow mGameWindow)
        {
            _common = new TDCommon(mGameWindow);

            OnUpdate += mFrameTime => _common.UpdatePositions();
            OnDrawBeforeCamera += _common.GUI.DrawBackground;
            AddDrawAction(DrawEntities);
            OnDrawAfterDefault += DrawGUI;
            InitializeInputs();
        }