public OverworldScrollAgent(GDOverworldScreen scrn, OverworldNode[] nodes) : base(scrn) { _nodes = nodes; _values = new AdaptionFloat[_nodes.Length]; int focus = 0; if (GDConstants.USE_IAB) { for (int i = 0; i < nodes.Length; i++) { if (!nodes[i].IsNodeEnabled) { break; } focus = i; } } else { focus = 1; } var offset0 = GDConstants.VIEW_WIDTH / 2f - focus * DIST_X; for (int i = 0; i < _nodes.Length; i++) { _values[i] = new AdaptionFloat(offset0 + i * DIST_X, FORCE, DRAG, MIN_SPEED); _nodes[i].NodePos = new FPoint(_values[i].Value, POSITION_Y); } CleanUpPositions(true); }
protected OverworldNode(GDOverworldScreen scrn, FPoint pos, int l10ntext, Guid id) : base(scrn, GDConstants.ORDER_WORLD_NODE) { _l10ndescription = l10ntext; NodePos = pos; ContentID = id; clickArea = AddClickMouseArea(FRectangle.CreateByCenter(FPoint.Zero, new FSize(SIZE, SIZE)), OnClick); }
public TransitionZoomInToTutorialAgent(GDOverworldScreen scrn, OverworldNode_Tutorial node) : base(scrn, DURATION) { _gdNode = node; vp = scrn.VAdapterGame; rectStart = scrn.GuaranteedMapViewport; rectFinal = FRectangle.CreateByCenter(node.Position, new FSize(1.8f * GDConstants.TILE_WIDTH, 1.8f * GDConstants.TILE_WIDTH)) .SetRatioUnderfitKeepCenter(GDConstants.VIEW_WIDTH * 1f / GDConstants.VIEW_HEIGHT); }
public ReappearTransitionAgent(GDOverworldScreen scrn, GraphBlueprint g) : base(scrn, DURATION) { _gdNode = scrn.GetEntities <OverworldNode>().First(n => n.ContentID == g.ID); vp = scrn.VAdapterGame; rectStart = FRectangle.CreateByCenter(_gdNode.Position, new FSize(1.8f * GDConstants.TILE_WIDTH, 1.8f * GDConstants.TILE_WIDTH)) .SetRatioUnderfitKeepCenter(GDConstants.VIEW_WIDTH * 1f / GDConstants.VIEW_HEIGHT); rectFinal = scrn.GuaranteedMapViewport; }
public void SetOverworldScreenWithTransition(GraphBlueprint bp) { var screen = new GDOverworldScreen(this, Graphics); SetCurrentScreen(screen); screen.ScrollAgent.ScrollTo(bp); screen.AddAgent(new ReappearTransitionOperation(bp)); screen.GDHUD.ScoreDispMan.FinishCounter(); }
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); }
public void SetOverworldScreen(bool noflicker = true) { var ovs = new GDOverworldScreen(this, Graphics); SetCurrentScreen(ovs); if (noflicker) { foreach (var node in ovs.GetEntities <OverworldNode>()) { node.FlickerTime = OverworldNode.COLLAPSE_TIME * 10; // no flicker - for sure } ovs.GDHUD.ScoreDispMan.FinishCounter(); } }
public void SetOverworldScreenCopy(GDOverworldScreen s) { if (s == null) { SetOverworldScreen(); return; } var ovs = new GDOverworldScreen(this, Graphics); SetCurrentScreen(ovs); foreach (var node in ovs.GetEntities <OverworldNode>()) { node.FlickerTime = OverworldNode.COLLAPSE_TIME * 10; // no flicker - for sure } ovs.ScrollAgent.CopyState(s.ScrollAgent); }
public void SetOverworldScreenWithSCCM(SCCMMainPanel.SCCMTab tab, bool noflicker = true) { var ovs = new GDOverworldScreen(this, Graphics); SetCurrentScreen(ovs); if (noflicker) { foreach (var node in ovs.GetEntities <OverworldNode>()) { node.FlickerTime = OverworldNode.COLLAPSE_TIME * 10; // no flicker - for sure } ovs.GDHUD.ScoreDispMan.FinishCounter(); } var pnl = new SCCMMainPanel(); ovs.HUD.AddModal(pnl, true, 0.5f, 1f); pnl.SelectTab(tab); }
public OverworldHUD(GDOverworldScreen scrn, bool firstShow) : base(scrn, Textures.HUDFontRegular) { AddElement(Settings = new SettingsButton()); ScoreDispMan = new ScoreDisplayManager(this, firstShow); #if FALSE AddElement(new HUDLabel { Alignment = HUDAlignment.CENTER, RelativePosition = new FPoint(0, -200), AutoSize = true, Background = HUDBackgroundDefinition.CreateSimple(Color.LightBlue), TextColor = Color.Red, FontSize = 64, Text = "INTERNAL ALPHA VERSION 4", }); #endif }
public OverworldScrollAgent(GDOverworldScreen scrn, OverworldNode[] nodes) : base(scrn) { _nodes = nodes; _values = new AdaptionFloat[_nodes.Length]; int focus = 0; switch (GDConstants.FLAVOR) { case GDFlavor.FREE: case GDFlavor.IAB: for (int i = 0; i < nodes.Length; i++) { if (!nodes[i].IsNodeEnabled) { break; } focus = i; } break; default: case GDFlavor.FULL: case GDFlavor.FULL_NOMP: focus = 1; break; } var offset0 = GDConstants.VIEW_WIDTH / 2f - focus * DIST_X; for (int i = 0; i < _nodes.Length; i++) { _values[i] = new AdaptionFloat(offset0 + i * DIST_X, FORCE, DRAG, MIN_SPEED); _nodes[i].NodePos = new FPoint(_values[i].Value, POSITION_Y); } CleanUpPositions(true); }
public OverworldNode_Tutorial(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, L10NImpl.STR_WORLD_TUTORIAL, Levels.WORLD_ID_TUTORIAL) { // }
public OverworldNode_W1(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, Levels.WORLD_001, null) { // }
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); }
public OverworldNode_W3(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, Levels.WORLD_003, GDConstants.IAB_WORLD3) { // }
public OverworldHUD(GDOverworldScreen scrn, bool firstShow) : base(scrn, Textures.HUDFontRegular) { AddElement(Settings = new SettingsButton()); AddElement(ScoreDisplay = new ScoreDisplay(firstShow)); AddElement(MPScoreDisplay = new MultiplayerScoreDisplay(ScoreDisplay, firstShow)); }