Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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;
            }
        }
Esempio n. 3
0
 private void frameFinishedUnityEventsHandler(object sender, EventArgs e)
 {
     OnFrameFinish.Invoke();
 }
Esempio n. 4
0
 private void frameStartedUnityEventsHandler(object sender, EventArgs e)
 {
     OnFrameStart.Invoke();
 }
Esempio n. 5
0
 public static void RunIdle(object sender, FrameEventArgs e)
 {
     FrameEvent?.Invoke(sender, e);
 }