Пример #1
0
        protected override void OnClick(GameEntityMouseArea area, SAMTime gameTime, InputState istate)
        {
#if DEBUG
            if (DebugSettings.Get("UnlockNode"))
            {
                OnClickUnlocked(); return;
            }

            if (DebugSettings.Get("WorldPreview"))
            {
                MainGame.Inst.Profile.PurchasedWorlds.Clear(); ShowPreview(); return;
            }
#endif

            _ustate = UnlockManager.IsUnlocked(Blueprint, true);

            if (_ustate == WorldUnlockState.Unlocked)
            {
                OnClickUnlocked();
            }
            else if (_ustate == WorldUnlockState.NeedsAction)
            {
                OnClickNeedsAction();
            }
            else if (_ustate == WorldUnlockState.FullyLocked)
            {
                OnClickFullyLocked();
            }
        }
Пример #2
0
        public MultiplayerMainPanel()
        {
            RelativePosition = FPoint.Zero;
            Size             = new FSize(WIDTH, HEIGHT);
            Alignment        = HUDAlignment.CENTER;
            Background       = FlatColors.BackgroundHUD;

            _ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_MULTIPLAYER, true);
        }
Пример #3
0
        public MultiplayerMainPanel()
        {
            RelativePosition = FPoint.Zero;
            Size             = new FSize(WIDTH, HEIGHT);
            Alignment        = HUDAlignment.CENTER;
            Background       = FlatColors.BackgroundHUD;

            _ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_MULTIPLAYER, true);

            //MainGame.Inst.GDBridge.IAB.SynchronizePurchases(GDConstants.IABList);
        }
Пример #4
0
        public OverworldNode_SCCM(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, L10NImpl.STR_WORLD_ONLINE, Levels.WORLD_ID_ONLINE)
        {
            AddOperationDelayed(new TetrisInitialOperation(0.50f), 0.75f);
            AddOperation(new CyclicSequenceOperation <OverworldNode_SCCM>(
                             new SleepOperation <OverworldNode_SCCM>(1.50f),
                             new TetrisFillOperation(5.50f),
                             new SleepOperation <OverworldNode_SCCM>(0.75f),
                             new TetrisBlendOperation(0.75f),
                             new SleepOperation <OverworldNode_SCCM>(0.25f),
                             new TetrisShrinkOperation(2.50f)));

            _ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_ONLINE, false);
        }
Пример #5
0
        protected OverworldNode_Graph(GDOverworldScreen scrn, FPoint pos, GraphBlueprint world, string iab)
            : base(scrn, pos, Levels.WORLD_NAMES[world.ID], world.ID)
        {
            Blueprint = world;
            IABCode   = iab;

            solvedPerc[FractionDifficulty.DIFF_0] = GetSolvePercentage(FractionDifficulty.DIFF_0);
            solvedPerc[FractionDifficulty.DIFF_1] = GetSolvePercentage(FractionDifficulty.DIFF_1);
            solvedPerc[FractionDifficulty.DIFF_2] = GetSolvePercentage(FractionDifficulty.DIFF_2);
            solvedPerc[FractionDifficulty.DIFF_3] = GetSolvePercentage(FractionDifficulty.DIFF_3);

            _swingPeriode *= FloatMath.GetRangedRandom(0.85f, 1.15f);

            _ustate = UnlockManager.IsUnlocked(world, false);
        }
Пример #6
0
        protected override void DoUpdate(SAMTime gameTime, InputState istate)
        {
            base.DoUpdate(gameTime, istate);

            if (!Alive)
            {
                return;
            }

            if (_ustate != WorldUnlockState.OpenAndUnlocked)
            {
                _ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_MULTIPLAYER, false);

                if (_ustate == WorldUnlockState.OpenAndUnlocked)
                {
                    Remove();
                    Owner.HUD.AddModal(new MultiplayerMainPanel(), true, 0.5f);
                }
            }
        }
Пример #7
0
        protected override void OnClick(GameEntityMouseArea area, SAMTime gameTime, InputState istate)
        {
#if DEBUG
            if (DebugSettings.Get("UnlockNode"))
            {
                OnClick_OpenAndUnlocked(); return;
            }

            if (DebugSettings.Get("WorldPreview"))
            {
                MainGame.Inst.Profile.PurchasedWorlds.Clear(); ShowPreview(); return;
            }
#endif

            _ustate = UnlockManager.IsUnlocked(Blueprint, true);

            //MainGame.Inst.GDBridge.IAB.SynchronizePurchases(GDConstants.IABList);

            switch (_ustate)
            {
            case WorldUnlockState.OpenAndUnlocked:
                OnClick_OpenAndUnlocked();
                break;

            case WorldUnlockState.ReachableButMustBePreviewed:
                OnClick_ReachableButMustBeBought();
                break;

            case WorldUnlockState.UnreachableButCanBePreviewed:
                OnClick_UnreachableButCanBeBought();
                break;

            case WorldUnlockState.UnreachableAndFullyLocked:
                OnClick_UnreachableAndFullyLocked();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Пример #8
0
        protected void DefaultActionClickFullyLocked()
        {
            if (GDConstants.USE_IAB)
            {
                Owner.HUD.ShowToast("OWNG::LOCKED(MULTI)", L10N.T(L10NImpl.STR_GLOB_WORLDLOCK), 40, FlatColors.Pomegranate, FlatColors.Foreground, 1.5f);
                MainGame.Inst.GDSound.PlayEffectError();

                AddEntityOperation(new ShakeNodeOperation());
                AddEntityOperation(new SimpleGameEntityOperation <OverworldNode_Graph>("ShowPreviewDelayed", 0.25f, (n, p) => { }, n => { }, n => n.ShowPreview()));
            }
            else
            {
                if (ForceClickCounter == 0)
                {
                    Owner.HUD.ShowToast("OWNG::UNLOCK_1(MULTI)", L10N.T(L10NImpl.STR_GLOB_UNLOCKTOAST1), 40, FlatColors.Silver, FlatColors.Foreground, 2f);
                    ForceClickCounter++;

                    MainGame.Inst.GDSound.PlayEffectError();
                    AddEntityOperation(new ShakeNodeOperation());
                }
                else if (ForceClickCounter == 1)
                {
                    Owner.HUD.ShowToast("OWNG::UNLOCK_2(MULTI)", L10N.T(L10NImpl.STR_GLOB_UNLOCKTOAST2), 40, FlatColors.Silver, FlatColors.Foreground, 2f);
                    ForceClickCounter++;

                    MainGame.Inst.GDSound.PlayEffectError();

                    AddEntityOperation(new ShakeNodeOperation());
                }
                else if (ForceClickCounter >= 2)
                {
                    Owner.HUD.ShowToast("OWNG::UNLOCK_3(MULTI)", L10N.T(L10NImpl.STR_GLOB_UNLOCKTOAST3), 40, FlatColors.Silver, FlatColors.Foreground, 2f);

                    MainGame.Inst.Profile.SkipTutorial = true;
                    MainGame.Inst.SaveProfile();
                    _ustate = WorldUnlockState.Unlocked;
                    return;
                }
            }
        }
Пример #9
0
        protected void DefaultActionClickNeedsAction()
        {
            if (GDConstants.USE_IAB)
            {
                ShowPreview();
                return;
            }
            else
            {
                if (ForceClickCounter == 0)
                {
                    Owner.HUD.ShowToast("OWNG::UNLOCK_1(MULTI)", L10N.T(L10NImpl.STR_GLOB_UNLOCKTOAST1), 40, FlatColors.Silver, FlatColors.Foreground, 2f);
                    ForceClickCounter++;

                    MainGame.Inst.GDSound.PlayEffectError();
                    AddEntityOperation(new ShakeNodeOperation());
                }
                else if (ForceClickCounter == 1)
                {
                    Owner.HUD.ShowToast("OWNG::UNLOCK_2(MULTI)", L10N.T(L10NImpl.STR_GLOB_UNLOCKTOAST2), 40, FlatColors.Silver, FlatColors.Foreground, 2f);
                    ForceClickCounter++;

                    MainGame.Inst.GDSound.PlayEffectError();

                    AddEntityOperation(new ShakeNodeOperation());
                }
                else if (ForceClickCounter >= 2)
                {
                    Owner.HUD.ShowToast("OWNG::UNLOCK_3(MULTI)", L10N.T(L10NImpl.STR_GLOB_UNLOCKTOAST3), 40, FlatColors.Silver, FlatColors.Foreground, 2f);

                    MainGame.Inst.Profile.SkipTutorial = true;
                    MainGame.Inst.SaveProfile();
                    _ustate = WorldUnlockState.Unlocked;
                    return;
                }
            }
        }
Пример #10
0
        public OverworldNode_MP(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, L10NImpl.STR_WORLD_MULTIPLAYER, Levels.WORLD_ID_MULTIPLAYER)
        {
            AddEntityOperationDelayed(new NetworkAnimationTriggerOperation(), NetworkAnimationTriggerOperation.INITIAL_DELAY);

            _ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_MULTIPLAYER, false);
        }