Example #1
0
 private void MouseInputEvent(InputDevice.MouseMoveEventArgs e)
 {
     if (GetEngineConsole.IsShownConsole)
     {
         return;
     }
     ECSWorld?.GetSingletonComponent <SingletonInput>().UpdateMousePosition(e.Offset);
 }
Example #2
0
        private void UpdateMainSystems(Timer timer)
        {
            configSC                   = ECSWorld.GetSingletonComponent <SingletonConfigVar>();
            configSC.ScreenWidth       = RenderBackend.ScreenProps.Width;
            configSC.ScreenHeight      = RenderBackend.ScreenProps.Height;
            configSC.ScreenAspectRatio = RenderBackend.ScreenProps.AspectRatio;

            transformsSystem.Update(timer);
            camerasSystem.Update(timer);
            lightSystem.Update(timer);
            renderSystem.Update(timer);
        }
Example #3
0
        private IFrameData m_Update()
        {
            Profiler.Frame();
            Time.Update();
            Update(Time);
            UpdateMainSystems(Time);
            Profiler.ECS();

            //TODO: Update RenderBackend
            //RenderBackend.RenderFrame(frameData);
            return(ECSWorld.GetSingletonComponent <SingletonFrameScene>().FrameData);
        }
Example #4
0
 private void OnInputKeyEvent(Keys key, bool isDown)
 {
     if (isDown)
     {
         if (key == Keys.Oem3)
         {
             if (GetEngineConsole.Toggle())
             {
                 ECSWorld?.GetSingletonComponent <SingletonInput>().ClearInputs();
             }
             return;
         }
         if (GetEngineConsole.IsShownConsole)
         {
             GetEngineConsole.OnKeyDown(key);
             return;
         }
         ECSWorld?.GetSingletonComponent <SingletonInput>().AddButtonFromKeyDown(key);
     }
     else
     {
         ECSWorld?.GetSingletonComponent <SingletonInput>().RemoveButtonFromKeyUp(key);
     }
 }