示例#1
0
 protected override void Update(GameTime gameTime)
 {
     base.Update(gameTime);
     EditorApp.CurrentGraphicsDevice = GraphicsDevice;
     EditorApp.EditorUpdate(gameTime);
     _lastGameTime = gameTime;
 }
        public void Initialize(EditorApp app)
        {
            m_EditorApp = app;
            var sceneRoot = m_EditorApp.Logic.GetSceneRoot(m_EditorApp.Logic.GetSceneID("/Root"));

            m_EditorCamera = sceneRoot.GetEntity("/_editorCamera");

            if (m_EditorCamera != null)
            {
                zoomTextBox.Text = ((int)(m_EditorCamera.GetComponent <Cv_CameraComponent>().Zoom * 100)).ToString() + "%";
            }
        }
示例#3
0
        private void CaravelEditor_Resize(object sender, EventArgs e)
        {
            Control control = (Control)sender;

            var eventArgs = new Cv_ResizeWindowEvt();

            eventArgs.Width  = control.Size.Width;
            eventArgs.Height = control.Size.Height;

            EditorApp.OnResize(this, eventArgs);
            EditorForm.RepositionToolBox();
        }
        public void Initialize(EditorApp app)
        {
            if (m_EditorApp != null)
            {
                return;
            }

            m_EditorApp       = app;
            stepXTextBox.Text = "1";
            stepYTextBox.Text = "1";
            m_EditorApp.EditorLogic.EntityDragStepX = 1;
            m_EditorApp.EditorLogic.EntityDragStepY = 1;
        }
示例#5
0
        protected override void Initialize()
        {
            base.Initialize();

            EditorApp = new EditorApp(GraphicsDevice, Editor, Width, Height);
            EditorApp.EditorInitialize();
            EditorApp.EditorLoadContent();

            Resize += new EventHandler(CaravelEditor_Resize);

            EditorForm.InitializeComponentEditor();
            EditorForm.InitializeMaterialsEditor();

            _lastGameTime = new GameTime();
        }
示例#6
0
 protected override void Draw()
 {
     base.Draw();
     EditorApp.EditorDraw(_lastGameTime);
 }