public override void Render(DwarfTime gameTime) { switch (Transitioning) { case TransitionMode.Running: DrawGUI(gameTime, 0); break; case TransitionMode.Entering: { float dx = Easing.CubeInOut(TransitionValue, -Game.GraphicsDevice.Viewport.Width, Game.GraphicsDevice.Viewport.Width, 1.0f); DrawGUI(gameTime, dx); } break; case TransitionMode.Exiting: { float dx = Easing.CubeInOut(TransitionValue, 0, Game.GraphicsDevice.Viewport.Width, 1.0f); DrawGUI(gameTime, dx); } break; } base.Render(gameTime); }
public override void Render(DwarfTime gameTime) { if (Transitioning == TransitionMode.Running) { DrawGUI(gameTime, 0); } else if (Transitioning == TransitionMode.Entering) { float dx = Easing.CubeInOut(TransitionValue, -Game.GraphicsDevice.Viewport.Width, Game.GraphicsDevice.Viewport.Width, 1.0f); DrawGUI(gameTime, dx); } else if (Transitioning == TransitionMode.Exiting) { float dx = Easing.CubeInOut(TransitionValue, 0, Game.GraphicsDevice.Viewport.Width, 1.0f); DrawGUI(gameTime, dx); } base.Render(gameTime); }
public override void Render(DwarfTime gameTime) { if (Transitioning == TransitionMode.Running) { DrawGUI(gameTime, 0); } else if (Transitioning == TransitionMode.Entering) { float dx = Easing.CubeInOut(TransitionValue, -Game.GraphicsDevice.Viewport.Width, Game.GraphicsDevice.Viewport.Width, 1.0f); DrawGUI(gameTime, dx); } else if (Transitioning == TransitionMode.Exiting) { // Doesn't actually hide GUI during world gen... just draws it off screen. WTF! float dx = Easing.CubeInOut(TransitionValue, 0, Game.GraphicsDevice.Viewport.Width, 1.0f); DrawGUI(gameTime, dx); } base.Render(gameTime); }
public override void Render(DwarfTime gameTime) { if (Transitioning == TransitionMode.Running) { Game.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; DrawGUI(gameTime, 0); } else if (Transitioning == TransitionMode.Entering) { float dx = Easing.CubeInOut(TransitionValue, -Game.GraphicsDevice.Viewport.Height, Game.GraphicsDevice.Viewport.Height, 1.0f); DrawGUI(gameTime, dx); } else if (Transitioning == TransitionMode.Exiting) { float dx = Easing.CubeInOut(TransitionValue, 0, Game.GraphicsDevice.Viewport.Height, 1.0f); DrawGUI(gameTime, dx); } base.Render(gameTime); }