Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        public void HandleTransparency(GameTime gameTime)
        {
            if (IsActive)
            {
                tranparencyTransition.Increase(gameTime);
            }
            else
            {
                tranparencyTransition.Decrease(gameTime);
            }

            Transparency = tranparencyTransition.Value;
        }
Ejemplo n.º 3
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (enabled)
            {
                tranparencyTransition.Increase(gameTime);
            }
            else
            {
                tranparencyTransition.Decrease(gameTime);
            }

            Transparency = tranparencyTransition.Value;
        }
Ejemplo n.º 4
0
        void HandleTransparency(GameTime gameTime)
        {
            if (Enabled)
                tranparencyTransition.Increase(gameTime);

            if (InteractionActors != null)
            {
                foreach (MapObject actor in InteractionActors)
                {
                    if (!actor.CollisionRectangle.Intersects(this.CollisionRectangle))
                    {
                        Enabled = true;
                        InteractionActors = null;
                    }
                }
            }

            Transparency = tranparencyTransition.Value;
        }
Ejemplo n.º 5
0
        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;
        }