Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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;
        }
Пример #5
0
        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();
        }
Пример #6
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);
        }
Пример #7
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);
        }
Пример #8
0
        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();
            }
        }
Пример #9
0
        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);
        }
Пример #10
0
        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);
        }
Пример #11
0
        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);
        }
Пример #13
0
 public OverworldNode_Tutorial(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, L10NImpl.STR_WORLD_TUTORIAL, Levels.WORLD_ID_TUTORIAL)
 {
     //
 }
Пример #14
0
 public OverworldNode_W1(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, Levels.WORLD_001, null)
 {
     //
 }
Пример #15
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);
        }
Пример #16
0
 public OverworldNode_W3(GDOverworldScreen scrn, FPoint pos) : base(scrn, pos, Levels.WORLD_003, GDConstants.IAB_WORLD3)
 {
     //
 }
Пример #17
0
 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));
 }