private void OnClickFinishPrev(HUDTextButton sender, HUDButtonEventArgs args) { if (UnlockManager.IsUnlocked(Levels.WORLD_001, false) != WorldUnlockState.OpenAndUnlocked) { MainGame.Inst.SetTutorialLevelScreen(); return; } if (UnlockManager.IsUnlocked(Levels.WORLD_002, false) != WorldUnlockState.OpenAndUnlocked) { MainGame.Inst.SetWorldMapScreenZoomedOut(Levels.WORLD_001); return; } if (UnlockManager.IsUnlocked(Levels.WORLD_003, false) != WorldUnlockState.OpenAndUnlocked) { MainGame.Inst.SetWorldMapScreenZoomedOut(Levels.WORLD_002); return; } if (UnlockManager.IsUnlocked(Levels.WORLD_004, false) != WorldUnlockState.OpenAndUnlocked) { MainGame.Inst.SetWorldMapScreenZoomedOut(Levels.WORLD_003); return; } MainGame.Inst.SetWorldMapScreenZoomedOut(Levels.WORLD_004); }
public WorldPreviewPanel(LevelBlueprint[] bps, Guid unlockID, string iab, int worldnumber) { _blueprints = bps; _id = unlockID; _iabCode = iab; _worldNumber = worldnumber; RelativePosition = FPoint.Zero; Size = new FSize(WIDTH, HEIGHT); Alignment = HUDAlignment.CENTER; Background = FlatColors.Asbestos; _unlockWorldNumber = 1; if (UnlockManager.IsUnlocked(Levels.WORLD_001, false) != WorldUnlockState.Unlocked) { _unlockWorldNumber = 0; } else { if (_worldNumber > 2 && UnlockManager.IsUnlocked(Levels.WORLD_002, false) == WorldUnlockState.Unlocked) { _unlockWorldNumber = 2; } if (_worldNumber > 3 && UnlockManager.IsUnlocked(Levels.WORLD_003, false) == WorldUnlockState.Unlocked) { _unlockWorldNumber = 3; } if (_worldNumber > 4 && UnlockManager.IsUnlocked(Levels.WORLD_004, false) == WorldUnlockState.Unlocked) { _unlockWorldNumber = 4; } } }
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(); } }
public MultiplayerMainPanel() { RelativePosition = FPoint.Zero; Size = new FSize(WIDTH, HEIGHT); Alignment = HUDAlignment.CENTER; Background = FlatColors.BackgroundHUD; _ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_MULTIPLAYER, true); }
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); }
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); }
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); }
protected override void OnClick(GameEntityMouseArea area, SAMTime gameTime, InputState istate) { var ownr = ((GDOverworldScreen)Owner); if (ownr.IsTransitioning) { return; } if (MainGame.Inst.Profile.AccountType == AccountType.Local) { MainGame.Inst.ShowToast(null, L10N.T(L10NImpl.STR_MP_CONNECTING), 40, FlatColors.Emerald, FlatColors.Foreground, 2f); MainGame.Inst.Backend.CreateUser(MainGame.Inst.Profile).RunAsync(); return; } //MainGame.Inst.GDBridge.IAB.SynchronizePurchases(GDConstants.IABList); var ustate = UnlockManager.IsUnlocked(Levels.WORLD_ID_ONLINE, true); switch (ustate) { case WorldUnlockState.OpenAndUnlocked: Owner.HUD.AddModal(new SCCMMainPanel(), true, 0.5f, 1f); break; case WorldUnlockState.ReachableButMustBePreviewed: case WorldUnlockState.UnreachableButCanBePreviewed: Owner.HUD.AddModal(new SCCMPreviewPanel(), true, 0.5f, 1f); break; case WorldUnlockState.UnreachableAndFullyLocked: Owner.HUD.ShowToast("ONSCCM::LOCKED(MULTI)", L10N.T(L10NImpl.STR_GLOB_WORLDLOCK), 40, FlatColors.Pomegranate, FlatColors.Foreground, 1.5f); MainGame.Inst.GDSound.PlayEffectError(); AddOperation(new ShakeNodeOperation()); break; default: SAMLog.Error("ONSCCM::EnumSwitch_OC", "ustate: " + ustate); throw new ArgumentOutOfRangeException(); } }
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; } if (UnlockManager.IsUnlocked(Blueprint.TargetWorld, true) == WorldUnlockState.OpenAndUnlocked) { Owner.AddAgent(new LeaveTransitionWorldMapAgent(GDOwner, GDOwner.ZoomState == BistateProgress.Expanded, this, Target)); MainGame.Inst.GDSound.PlayEffectZoomOut(); } else { Owner.AddAgent(new LeaveTransitionOverworldAgent(GDOwner, GDOwner.ZoomState == BistateProgress.Expanded)); MainGame.Inst.GDSound.PlayEffectZoomOut(); } }
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); } } }
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(); } }
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); }