void ManipulateScale(GameTime gameTime) { switch (currentState) { case MenuStateEnum.Maximizing: transition.Increase(gameTime); break; case MenuStateEnum.Minimizing: transition.Decrease(gameTime); break; } if (transition.Value == 0.0f) { if (pendingWindow == null) { currentState = MenuStateEnum.Hidden; } else { activeWindow = pendingWindow; activeWindow.IsActive = true; this.currentState = MenuStateEnum.Maximizing; } } else if (transition.Value == transition.MaxValue) { currentState = MenuStateEnum.Focused; } camera.Zoom = transition.Value; }
public void HandleTransparency(GameTime gameTime) { if (IsActive) { tranparencyTransition.Increase(gameTime); } else { tranparencyTransition.Decrease(gameTime); } Transparency = tranparencyTransition.Value; }
public override void Update(GameTime gameTime) { base.Update(gameTime); if (enabled) { tranparencyTransition.Increase(gameTime); } else { tranparencyTransition.Decrease(gameTime); } Transparency = tranparencyTransition.Value; }
void HandleTransparency(GameTime gameTime) { if (ReduceTransparency) { tranparencyTransition.Decrease(gameTime); } else { tranparencyTransition.Increase(gameTime); } if (tranparencyTransition.Value == tranparencyTransition.MinValue) { ReduceTransparency = false; } else if (tranparencyTransition.Value == tranparencyTransition.MaxValue) { ReduceTransparency = true; } Transparency = tranparencyTransition.Value; }