Exemplo n.º 1
0
        private void OnClick(GameEntityMouseArea sender, SAMTime gameTime, InputState istate)
        {
            if (GDOwner.ZoomState != BistateProgress.Normal && GDOwner.ZoomState != BistateProgress.Expanded)
            {
                return;
            }

#if DEBUG
            if (!NodeEnabled && DebugSettings.Get("UnlockNode"))
            {
                NodeEnabled = true;
            }
#endif
            if (!NodeEnabled)
            {
                MainGame.Inst.GDSound.PlayEffectError();

                if (GDOwner.ZoomState == BistateProgress.Expanded)
                {
                    AddEntityOperation(new ScreenShakeOperation2(this, GDOwner));
                }
                else
                {
                    AddEntityOperation(new ScreenShakeAndCenterOperation2(this, GDOwner));
                }

                Owner.HUD.ShowToast("WN::LOCKED", L10N.T(L10NImpl.STR_GLOB_WORLDLOCK), 40, FlatColors.Pomegranate, FlatColors.Foreground, 1.5f);

                return;
            }

            Owner.AddAgent(new LeaveTransitionGameEndAgent(GDOwner, GDOwner.ZoomState == BistateProgress.Expanded, this));
            MainGame.Inst.GDSound.PlayEffectZoomOut();
        }
Exemplo n.º 2
0
        private void OnClick(GameEntityMouseArea sender, SAMTime gameTime, InputState istate)
        {
            if (GDOwner.ZoomState != BistateProgress.Normal && GDOwner.ZoomState != BistateProgress.Expanded)
            {
                return;
            }

            Owner.AddAgent(new LeaveTransitionOverworldOperation(GDOwner.ZoomState == BistateProgress.Expanded));
            MainGame.Inst.GDSound.PlayEffectZoomOut();
        }