private void MouseInputEvent(InputDevice.MouseMoveEventArgs e) { if (GetEngineConsole.IsShownConsole) { return; } ECSWorld?.GetSingletonComponent <SingletonInput>().UpdateMousePosition(e.Offset); }
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); }
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); }
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); } }