/// <summary> /// Sets the dimension of the window /// </summary> /// <param name="width"></param> /// <param name="height"></param> public void SetFrameDimension(int width, int height) { graphics.PreferredBackBufferWidth = width; graphics.PreferredBackBufferHeight = height; graphics.ApplyChanges(); OnResize?.Invoke(window.ClientBounds); }
/// <summary> /// Updates the scene manager and it's current scene. /// </summary> /// <param name="gameTime"></param> public void Update(GameTime gameTime) { currentScene?.Update(gameTime); if (previousWindowPosition != window.Position) { OnMove?.Invoke(window.ClientBounds); previousWindowPosition = window.Position; } }
private void frameFinishedUnityEventsHandler(object sender, EventArgs e) { OnFrameFinish.Invoke(); }
private void frameStartedUnityEventsHandler(object sender, EventArgs e) { OnFrameStart.Invoke(); }
public static void RunIdle(object sender, FrameEventArgs e) { FrameEvent?.Invoke(sender, e); }