private void Initialize()
 {
     m_TopOffset = 0;
     mPopupState = PopupState.slide;
     this.PopupMessageWindow.Left = -this.Width;
     this.PopupMessageWindow.Top = m_TopOffset;
 }
Exemplo n.º 2
0
        internal void Show(Popup popup)
        {
            _queue.Add(popup);

            if (_current == null)
            {
                _current = _queue[0];

                _queue.RemoveAt(0);

                Cursor = _current.Cursor;

                CalculatePopupRect();

                if (PopupUtil.ShouldShowPopup(this, _popupScreen))
                {
                    ShowPopup();
                }
                else
                {
                    _state = PopupState.Pending;

                    _popupTimer.Interval = 200;
                    _popupTimer.Start();
                }
            }
        }
Exemplo n.º 3
0
        protected override bool CanAttack(Actor self, Target target)
        {
            if (state == PopupState.Transitioning)
            {
                return(false);
            }

            if (!base.CanAttack(self, target))
            {
                return(false);
            }

            idleTicks = 0;
            if (state == PopupState.Closed)
            {
                state = PopupState.Transitioning;
                wsb.PlayCustomAnimation(self, info.OpeningSequence, () =>
                {
                    state = PopupState.Open;
                    wsb.PlayCustomAnimationRepeating(self, wsb.Info.Sequence);
                });
                return(false);
            }

            return(true);
        }
Exemplo n.º 4
0
        private void AnimateWaiting()
        {
            _popupTimer.Stop();

            if (_queue.Count > 0)
            {
                _state = PopupState.Waiting;

                if (_current != null)
                {
                    _current.Dispose();
                }

                _current = _queue[0];

                _queue.RemoveAt(0);

                if (_current == null)
                {
                    throw new Exception("Expected current popup");
                }

                CalculatePopupRect();
                UpdateFromAnimationStep();

                _popupTimer.Interval = _current.Duration;
                _popupTimer.Start();

                Invalidate();
            }
            else
            {
                CompleteClosing();
            }
        }
Exemplo n.º 5
0
 public virtual void Hide()
 {
     if (State != PopupState.Hided)
     {
         State = PopupState.Hiding;
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// Pushes a popup onto the popup stack.
        /// </summary>
        /// <param name="popup">The popup.</param>
        /// <returns>
        /// The popup result.
        /// </returns>
        public object ShowPopup(UIElement popup)
        {
            //  Raise the popup opened event.
            var args = new RoutedEventArgs(PopupOpenedEvent);

            RaiseEvent(args);

            //  Create a new popup state with a new dispatcher frame.
            var popupState = new PopupState()
            {
                PopupElement    = popup,
                DispatcherFrame = new DispatcherFrame()
            };

            //  Push our popup state onto the popup stack.
            popupStack.Push(popupState);

            //  Transition the popup.
            popupAnimationHelper.ShowPopup(popupHost, popup);

            //  Push the dispatcher frame - this will now block until we close the popup.
            Dispatcher.PushFrame(popupState.DispatcherFrame);

            //  Return the popup result (which by now will be stored in its state).
            return(popupState.PopupResult);
        }
Exemplo n.º 7
0
        protected override bool CanAttack(Actor self, Target target)
        {
            if (state == PopupState.Transitioning || !building.Value.BuildComplete)
            {
                return(false);
            }

            if (!base.CanAttack(self, target))
            {
                return(false);
            }

            idleTicks = 0;
            if (state == PopupState.Closed)
            {
                state = PopupState.Transitioning;
                rb.PlayCustomAnimThen(self, "opening", () =>
                {
                    state = PopupState.Open;
                    rb.PlayCustomAnimRepeating(self, "idle");
                });
                return(false);
            }

            if (!turret.FaceTarget(self, target))
            {
                return(false);
            }

            return(true);
        }
        private void changeState(PopupState newState)
        {
            currentState = newState;
            switch (newState)
            {
            case PopupState.Uninitialized:
            case PopupState.AwaitingResults:
                RewardPanel.SetActive(value: false);
                EndGameButtonPanel.SetActive(value: false);
                ClaimButtonPanel.SetActive(value: false);
                CalculatingResultsPanel.SetActive(value: true);
                break;

            case PopupState.AwaitingClaim:
                ResultsAnimator.SetTrigger(ResultsAnimatorTrigger);
                RewardPanel.SetActive(value: true);
                EndGameButtonPanel.SetActive(value: false);
                ClaimButtonPanel.SetActive(value: true);
                CalculatingResultsPanel.SetActive(value: false);
                break;

            case PopupState.Complete:
                RewardPanel.SetActive(value: true);
                EndGameButtonPanel.SetActive(value: true);
                ClaimButtonPanel.SetActive(value: false);
                CalculatingResultsPanel.SetActive(value: false);
                break;
            }
        }
Exemplo n.º 9
0
        public void Show(Action _activatedCallback = null, Action _cancelledCallback = null, Action _deactivatedCallback = null)
        {
            activatedCallback   = _activatedCallback;
            cancelledCallback   = _cancelledCallback;
            deactivatedCallback = _deactivatedCallback;

            gameObject.SetActive(true);
            CurrentPopupState = PopupState.Open;

            if (isModal)
            {
                InputManager.Instance.PushModalInputHandler(gameObject);
            }

            if (closeOnNonTargetedTap)
            {
                InputManager.Instance.PushFallbackInputHandler(gameObject);
            }

            // the visual was activated via an interaction outside of the menu, let anyone who cares know
            if (this.activatedCallback != null)
            {
                this.activatedCallback();
            }
        }
Exemplo n.º 10
0
        public override void OnNext(GameStateManager value)
        {
            switch (value.CurrentState)
            {
            case GameState.StartScreen:
                State = PopupState.Removed;
                break;

            case GameState.CharacterMenu:
                State = PopupState.Colapsed;
                break;

            case GameState.MapsMenu:
                State = PopupState.Colapsed;
                break;

            case GameState.GamePlay:
                State = PopupState.Removed;
                break;

            case GameState.GamePause:
                State = PopupState.GamePause;
                break;
            }
        }
Exemplo n.º 11
0
        private void SetupPopup()
        {
            var mover   = (Mover)this.target;
            var drivers = mover.GetDrivers();
            var labels  = drivers.Select(x => string.Format("{0}", x.Name));

            this.popupState = new PopupState(labels);
        }
Exemplo n.º 12
0
 public virtual void Show()
 {
     if (State != PopupState.Showed)
     {
         State = PopupState.Showing;
     }
     gameObject.SetActive(true);
 }
Exemplo n.º 13
0
        protected virtual void Hide()
        {
            if (usePause)
            {
                Game1.Paused = false;
            }

            popupState = PopupState.Finished;
        }
 void INotifyBuildComplete.BuildingComplete(Actor self)
 {
     if (skippedMakeAnimation)
     {
         state = PopupState.Closed;
         wsb.PlayCustomAnimationRepeating(self, info.ClosedIdleSequence);
         turret.DesiredFacing = null;
     }
 }
Exemplo n.º 15
0
 public virtual void Initialize()
 {
     InitializePositions();
     useOkayButton = true;
     popupState    = PopupState.Hidden;
     canvasOrigin  = new Vector2(canvas.SourceRectangle.Value.Width / 2,
                                 canvas.SourceRectangle.Value.Height / 2);
     canvasScale = new Vector2(1, 1);
 }
Exemplo n.º 16
0
    // Use this for initialization
    void Start()
    {
        m_CanvasGroup       = GetComponent <CanvasGroup>();
        m_CanvasGroup.alpha = 0.0f;

        // m_MainCanvas.GetComponent<CanvasGroup>().alpha = 1.0f;

        m_State = PopupState.NONE;
    }
Exemplo n.º 17
0
 public void ShowPopup(string message)
 {
     if (m_State == PopupState.NONE || m_State == PopupState.SHOWING_POP)
     {
         m_State = (m_State == PopupState.SHOWING_POP) ? PopupState.RE_FADING_OUT_POP : PopupState.FADING_OUT_MAIN;
         Text text = GetComponentInChildren <Text>();
         text.text = message;
     }
 }
Exemplo n.º 18
0
 public void BuildingComplete(Actor self)
 {
     if (skippedMakeAnimation)
     {
         state = PopupState.Closed;
         rb.PlayCustomAnimRepeating(self, "closed-idle");
         turret.DesiredFacing = null;
     }
 }
Exemplo n.º 19
0
        public virtual void Show()
        {
            popupState = PopupState.Showing;

            if (usePause)
            {
                Game1.Paused = true;
            }
        }
Exemplo n.º 20
0
 public void SwitchState(PopupState state)
 {
     if (state == PopupState.Highlighted)
     {
         SetStateHighlighted();
     }
     else if (state == PopupState.NotHighlighted)
     {
         SetStateNotHighlighted();
     }
 }
Exemplo n.º 21
0
 public override void BuildingComplete(Actor self)
 {
     // Set true for SkipMakeAnimsInit
     if (buildComplete)
     {
         State = PopupState.Closed;
         self.Trait <RenderBuilding>()
         .PlayCustomAnimRepeating(self, "closed-idle");
         turret.desiredFacing = null;
     }
     buildComplete = true;
 }
Exemplo n.º 22
0
 public override void BuildingComplete(Actor self)
 {
     // Set true for SkipMakeAnimsInit
     if (buildComplete)
     {
         State = PopupState.Closed;
         self.Trait<RenderBuilding>()
             .PlayCustomAnimRepeating(self, "closed-idle");
         turret.desiredFacing = null;
     }
     buildComplete = true;
 }
Exemplo n.º 23
0
        protected override void Created(Actor self)
        {
            base.Created(self);

            // Map placed actors are created in the closed state
            if (skippedMakeAnimation)
            {
                state = PopupState.Closed;
                wsb.PlayCustomAnimationRepeating(self, info.ClosedIdleSequence);
                turret.DesiredFacing = null;
            }
        }
Exemplo n.º 24
0
        public void Show(GameObject newlySelectedObject, Action _activatedCallback = null, Action _cancelledCallback = null, Action _deactivatedCallback = null)
        {
            // Skyler -- singleton show
            if (!Menu.Instance.SetMenu(gameObject))
            {
                return;
            }

            transform.Find("TextureMenu").transform.GetComponentInChildren <TextureMenu> ().currentlySelected = newlySelectedObject;
            currentSelectedObject = newlySelectedObject;
            if (rootAnimator.isInitialized)
            {
                rootAnimator.Play("Hydrate");
                rootAnimator.ResetTrigger("Dehydrate");
            }


            // Debug.Log("Show stack retrace");

            activatedCallback   = _activatedCallback;
            cancelledCallback   = _cancelledCallback;
            deactivatedCallback = _deactivatedCallback;

            gameObject.SetActive(true);
            CurrentPopupState = PopupState.Open;

            if (isModal)
            {
                InputManager.Instance.PushModalInputHandler(gameObject);
            }

            if (closeOnNonTargetedTap)
            {
                InputManager.Instance.PushFallbackInputHandler(gameObject);
            }

            // the visual was activated via an interaction outside of the menu, let anyone who cares know
            if (this.activatedCallback != null)
            {
                this.activatedCallback();
            }

            //Debug.Log (this.gameObject+ " should be looking at you");
            if (CenterOnCamera)
            {
                gameObject.transform.LookAt(gameObject.transform.position * 2 - GameObject.FindObjectOfType <Camera> ().transform.position);

                transform.Translate(Vector3.ClampMagnitude((GameObject.FindObjectOfType <Camera> ().transform.position - gameObject.transform.position).normalized, 1) * .8f, Space.World);
                transform.Translate(Vector3.left * .1f, Space.Self);
            }
            //Debug.Log("Finishing the Show function " + this.gameObject);
        }
Exemplo n.º 25
0
	public PopupBaseScript CreatePopup(PopupState eState){
		CameraResume (false);
		MainData.POPUP = eState;
		GameObject oPopup = (GameObject)Instantiate (Resources.Load ("Main/Popup/" + eState.ToString()));
		PopupBaseScript sPopup = oPopup.GetComponent<PopupBaseScript> ();
		oPopup.name = eState.ToString ();
		oPopup.transform.parent = this.transform;
		oPopup.transform.localPosition = Vector3.zero;
		oPopup.transform.localScale = Vector3.one;
		sPopup.SetManager (this, MainData);
		sPopup.Init ();
		return sPopup;
	}
Exemplo n.º 26
0
        public void ShowNext()
        {
            if (_queue.Count == 0)
            {
                CancelAll();
            }
            else
            {
                _state = PopupState.Waiting;

                AnimateWaiting();
            }
        }
Exemplo n.º 27
0
 public AttackPopupTurreted(ActorInitializer init, AttackPopupTurretedInfo info)
     : base(init.self)
 {
     Info = info;
     Turret = init.self.Trait<Turreted>();
     if (init.Contains<SkipMakeAnimsInit>())
     {
         State = PopupState.Closed;
         init.self.Trait<RenderBuilding>()
             .PlayCustomAnimRepeating(init.self, "closed-idle");
         Turret.desiredFacing = null;
     }
 }
Exemplo n.º 28
0
        private void OpeningComplete()
        {
            _animationStep = AnimationSteps;
            _state         = PopupState.Waiting;

            UpdateFromAnimationStep();

            if (!_mouseOver)
            {
                _popupTimer.Interval = _current.Duration;
                _popupTimer.Start();
            }
            else
            {
                _popupTimer.Stop();
            }
        }
Exemplo n.º 29
0
        /// <summary>
        /// Dismiss the details pane
        /// </summary>
        public void Dismiss()
        {
            Debug.Log("Being dismissed " + this.gameObject);
            currentSelectedObject = null;

            // Debug.Log(" Dismissing " + this.gameObject);
            Menu.Instance.currentMenu = null;

            // Deactivates the game object
            if (rootAnimator.isInitialized)
            {
                rootAnimator.SetTrigger("Dehydrate");
            }
            else
            {
                gameObject.SetActive(false);
            }

            if (deactivatedCallback != null)
            {
                deactivatedCallback();
            }

            if (isModal)
            {
                InputManager.Instance.PopModalInputHandler();
            }

            if (closeOnNonTargetedTap)
            {
                // Debug.Log("Before Pop");
                // InputManager.Instance.PopFallbackInputHandler();
                //Debug.Log("After Pop");
            }

            CurrentPopupState = PopupState.Closed;

            activatedCallback   = null;
            cancelledCallback   = null;
            deactivatedCallback = null;

            if (cancelButton)
            {
                cancelButton.Selected = false;
            }
        }
Exemplo n.º 30
0
        private void closeMenuBox(int i)
        {
            if (CurrentState == GameState.MapsMenu || CurrentState == GameState.CharacterMenu)
            {
                this.State = PopupState.Colapsed;
            }
            else
            {
                this.State = PopupState.Removed;
            }

            //Unpauses the game if in gamepuase
            if (CurrentState == GameState.GamePause)
            {
                CurrentState = GameState.GamePlay;
            }
        }
Exemplo n.º 31
0
 public void TickIdle(Actor self)
 {
     if (state == PopupState.Open && idleTicks++ > info.CloseDelay)
     {
         turret.DesiredFacing = info.DefaultFacing;
         state = PopupState.Rotating;
     }
     else if (state == PopupState.Rotating && turret.TurretFacing == info.DefaultFacing)
     {
         state = PopupState.Transitioning;
         rb.PlayCustomAnimThen(self, "closing", () =>
         {
             state = PopupState.Closed;
             rb.PlayCustomAnimRepeating(self, "closed-idle");
             turret.DesiredFacing = null;
         });
     }
 }
Exemplo n.º 32
0
        /// <summary>
        /// Pushes a popup onto the popup stack.
        /// </summary>
        /// <param name="popup">The popup.</param>
        /// <param name="onPopopClosed">The action to invoke when the popop is closed.</param>
        public void ShowPopup(UIElement popup, Action <object> onPopopClosed)
        {
            //  Fire the popup opened event.
            FirePopupOpened();

            //  Create the popup state.
            var popupState = new PopupState()
            {
                PopupElement = popup,
                ClosedAction = onPopopClosed
            };

            //  Push our popup onto the popup stack.
            popupStack.Push(popupState);

            //  Transition the popup.
            popupAnimationHelper.ShowPopup(popupHost, popup);
        }
Exemplo n.º 33
0
 void INotifyIdle.TickIdle(Actor self)
 {
     if (state == PopupState.Open && idleTicks++ > info.CloseDelay)
     {
         turret.DesiredFacing = info.DefaultFacing;
         state = PopupState.Rotating;
     }
     else if (state == PopupState.Rotating && turret.TurretFacing == info.DefaultFacing)
     {
         state = PopupState.Transitioning;
         wsb.PlayCustomAnimation(self, info.ClosingSequence, () =>
         {
             state = PopupState.Closed;
             wsb.PlayCustomAnimationRepeating(self, info.ClosedIdleSequence);
             turret.DesiredFacing = null;
         });
     }
 }
Exemplo n.º 34
0
 public void TickIdle(Actor self)
 {
     if (State == PopupState.Open && IdleTicks++ > Info.CloseDelay)
     {
         turret.desiredFacing = Info.DefaultFacing;
         State = PopupState.Rotating;
     }
     else if (State == PopupState.Rotating && turret.turretFacing == Info.DefaultFacing)
     {
         State = PopupState.Transitioning;
         var rb = self.Trait<RenderBuilding>();
         rb.PlayCustomAnimThen(self, "closing", () =>
         {
             State = PopupState.Closed;
             rb.PlayCustomAnimRepeating(self, "closed-idle");
             turret.desiredFacing = null;
         });
     }
 }
Exemplo n.º 35
0
 public void TickIdle(Actor self)
 {
     if (State == PopupState.Open && IdleTicks++ > Info.CloseDelay)
     {
         turret.desiredFacing = Info.DefaultFacing;
         State = PopupState.Rotating;
     }
     else if (State == PopupState.Rotating && turret.turretFacing == Info.DefaultFacing)
     {
         State = PopupState.Transitioning;
         var rb = self.Trait <RenderBuilding>();
         rb.PlayCustomAnimThen(self, "closing", () =>
         {
             State = PopupState.Closed;
             rb.PlayCustomAnimRepeating(self, "closed-idle");
             turret.desiredFacing = null;
         });
     }
 }
Exemplo n.º 36
0
        private void OpeningComplete()
        {
            _animationStep = AnimationSteps;
            _state = PopupState.Waiting;

            UpdateFromAnimationStep();

            if (!_mouseOver)
            {
                _popupTimer.Interval = _current.Duration;
                _popupTimer.Start();
            }
            else
            {
                _popupTimer.Stop();
            }
        }
 private void onSlideStateFrame()
 {
     this.PopupMessageWindow.Left += PopupConfig.Instance.PixelsPerFrame;
     if (this.PopupMessageWindow.Left > PopupConfig.Instance.Margin)
     {
         this.PopupMessageWindow.Left = PopupConfig.Instance.Margin;
         mPopupState = PopupState.display;
     }
 }
Exemplo n.º 38
0
        public void ShowNext()
        {
            if (_queue.Count == 0)
            {
                CancelAll();
            }
            else
            {
                _state = PopupState.Waiting;

                AnimateWaiting();
            }
        }
Exemplo n.º 39
0
        public void Show(Action _activatedCallback = null, Action _cancelledCallback = null, Action _deactivatedCallback = null)
        {
            activatedCallback = _activatedCallback;
            cancelledCallback = _cancelledCallback;
            deactivatedCallback = _deactivatedCallback;

            gameObject.SetActive(true);
            CurrentPopupState = PopupState.Open;

            if (isModal)
            {
                InputManager.Instance.PushModalInputHandler(gameObject);
            }

            if (closeOnNonTargetedTap)
            {
                InputManager.Instance.PushFallbackInputHandler(gameObject);
            }

            // the visual was activated via an interaction outside of the menu, let anyone who cares know
            if (this.activatedCallback != null)
            {
                this.activatedCallback();
            }
        }
Exemplo n.º 40
0
        /// <summary>
        /// Dismiss the details pane
        /// </summary>
        public void Dismiss()
        {
            // Deactivates the game object
            if (rootAnimator.isInitialized)
            {
                rootAnimator.SetTrigger("Dehydrate");
            }
            else
            {
                gameObject.SetActive(false);
            }

            if (deactivatedCallback != null)
            {
                deactivatedCallback();
            }

            if (isModal)
            {
                InputManager.Instance.PopModalInputHandler();
            }

            if (closeOnNonTargetedTap)
            {
                InputManager.Instance.PopFallbackInputHandler();
            }

            CurrentPopupState = PopupState.Closed;

            activatedCallback = null;
            cancelledCallback = null;
            deactivatedCallback = null;

            if (cancelButton)
            {
                cancelButton.Selected = false;
            }
        }
Exemplo n.º 41
0
        private void closeMenuBox(int i)
        {
            if (CurrentState == GameState.MapsMenu || CurrentState ==  GameState.CharacterMenu)
                this.State = PopupState.Colapsed;
            else
                this.State = PopupState.Removed;

            //Unpauses the game if in gamepuase
            if (CurrentState == GameState.GamePause)
            {
                CurrentState = GameState.GamePlay;
            }
        }
Exemplo n.º 42
0
        internal void Show(Popup popup)
        {
            _queue.Add(popup);

            if (_current == null)
            {
                _current = _queue[0];

                _queue.RemoveAt(0);

                Cursor = _current.Cursor;

                CalculatePopupRect();

                if (PopupUtil.ShouldShowPopup(this, _popupScreen))
                {
                    ShowPopup();
                }
                else
                {
                    _state = PopupState.Pending;

                    _popupTimer.Interval = 200;
                    _popupTimer.Start();
                }
            }
        }
Exemplo n.º 43
0
        protected override bool CanAttack( Actor self, Target target )
        {
            if (State == PopupState.Transitioning)
                return false;

            if( self.HasTrait<Building>() && !buildComplete )
                return false;

            if (!base.CanAttack( self, target ))
                return false;

            IdleTicks = 0;
            if (State == PopupState.Closed)
            {
                State = PopupState.Transitioning;
                var rb = self.Trait<RenderBuilding>();
                rb.PlayCustomAnimThen(self, "opening", () =>
                {
                    State = PopupState.Open;
                    rb.PlayCustomAnimRepeating(self, "idle");
                });
                return false;
            }

            if (!turret.FaceTarget(self,target)) return false;

            return true;
        }
Exemplo n.º 44
0
        private void AnimateWaiting()
        {
            _popupTimer.Stop();

            if (_queue.Count > 0)
            {
                _state = PopupState.Waiting;

                if (_current != null)
                {
                    _current.Dispose();
                }

                _current = _queue[0];

                _queue.RemoveAt(0);

                if (_current == null)
                    throw new Exception("Expected current popup");

                CalculatePopupRect();
                UpdateFromAnimationStep();

                _popupTimer.Interval = _current.Duration;
                _popupTimer.Start();

                Invalidate();
            }
            else
            {
                CompleteClosing();
            }
        }
 public PopupStateChangedEvent(PopupState state)
 {
     this.state = state;
 }
Exemplo n.º 46
0
        private void ShowPopup()
        {
            Popup.RaisePopupOpening(new PopupEventArgs(_current));

            if (DegradeVisualPerformance())
            {
                OpeningComplete();
            }
            else
            {
                _state = PopupState.Opening;
                _animationStep = 0;

                _popupTimer.Interval = _current.AnimationDuration / AnimationSteps;
                _popupTimer.Start();

                NativeMethods.SetLayeredWindowAttributes(Handle, 0, 0, NativeMethods.LWA_ALPHA);
            }

            NativeMethods.ShowWindow(Handle, NativeMethods.SW_SHOWNOACTIVATE);
        }
Exemplo n.º 47
0
        protected override bool CanAttack( Actor self, Target target )
        {
            if (State == PopupState.Transitioning)
                return false;

            if( self.HasTrait<Building>() && !buildComplete )
                return false;

            if (!base.CanAttack( self, target ))
                return false;

            IdleTicks = 0;
            if (State == PopupState.Closed)
            {
                State = PopupState.Transitioning;
                var rb = self.Trait<RenderBuilding>();
                rb.PlayCustomAnimThen(self, "opening", () =>
                {
                    State = PopupState.Open;
                    rb.PlayCustomAnimRepeating(self, "idle");
                });
                return false;
            }

            Turret.desiredFacing = Util.GetFacing( target.CenterLocation - self.CenterLocation, Turret.turretFacing );
            if( Turret.desiredFacing != Turret.turretFacing )
                return false;

            return true;
        }
Exemplo n.º 48
0
        /// <summary>
        /// Runs when game menu is clicked on
        /// </summary>
        /// <param name="index">entry Index</param>
        private void gameMenuClick(int index)
        {
            switch (index)
            {
                case 0:
                    CurrentState = GameState.CharacterMenu;
                    //Deselects players character so menu don't think it's selected
                    foreach (var pad in GamePadControllers)
                    {
                        pad.PlayerModel.SelectedCharacter = null;
                    }
                    break;
                case 1:
                    CurrentState = GameState.MapsMenu;
                    break;
            }

            Disabled = false;
            State = PopupState.Colapsed;
            AddController(new MenuController(Screen));
        }
Exemplo n.º 49
0
 public override void OnNext(GameStateManager value)
 {
     switch (value.CurrentState)
     {
         case GameState.StartScreen:
             State = PopupState.Removed;
             break;
         case GameState.CharacterMenu:
             State = PopupState.Colapsed;
             break;
         case GameState.MapsMenu:
             State = PopupState.Colapsed;
             break;
         case GameState.GamePlay:
             State = PopupState.Removed;
             break;
         case GameState.GamePause:
             State = PopupState.GamePause;
             break;
     }
 }
 private void onDisplayStateFrame()
 {
     display_interval -= frame_delay;
     if (display_interval <= 0)
         mPopupState = PopupState.die;
 }