Ejemplo n.º 1
0
 internal void SwitchLeftRight()
 {
     bCursorFocusRight = !bCursorFocusRight;
     selectedAbility   = null;
     if (selectionTimer == null)
     {
         selectionTimer = new TimingUtility(30, true, StopSelectionTimerWhen);
         selectionTimer.SetStepTimer(40);
     }
 }
Ejemplo n.º 2
0
 internal void LoadGameButton()
 {
     if (LoadGameScreen.HasSaveFiles(SaveDataProcessor.saveFolder))
     {
         lgs               = new LoadGameScreen(SaveDataProcessor.saveFolder, this);
         currentScreen     = Screens.load;
         loadGameDataTimer = new TimingUtility(40, false, stopTimer1);
         loadGameDataTimer.SetStepTimer(60, 0);
     }
 }
        static internal void Update(GameTime gt)
        {
            texTimer.Tick(gt);

            if (texTimer.IsDone())
            {
                texTimer.SetStepTimer(120, 0);
                texTimer.Start();
                bBuildUp = !bBuildUp;
            }
        }
 internal TacticalTextPopUp(String s, BaseCharacter p, Vector2 offSet, Point textBoxSize, int steps, UpdateFunc uf = null, DrawFunc df = null)
 {
     if (bInitialize)
     {
         Inititialize();
     }
     text     = s;
     parent   = p;
     location = p.trueMapSize().Location.ToVector2() + offSet;
     textBox  = new Rectangle(location.ToPoint(), textBoxSize);
     timer    = new TimingUtility(16, true, standardTimer);
     timer.SetStepTimer(steps, 0);
     updateFunction = uf;
     drawFunction   = df;
 }
Ejemplo n.º 5
0
        internal void Update(GameTime gt)
        {
            if (bGenerateMatrixRight)
            {
                mRight = Matrix.CreateTranslation(0, scrollOffSetRight, 1);
                bGenerateMatrixRight = false;
            }

            if (bGenerateMatrixLeft)
            {
                mLeft = Matrix.CreateTranslation(0, scrollOffSetLeft, 1);
                bGenerateMatrixLeft = false;
            }

            if (selectionTimer != null)
            {
                selectionTimer.Tick(gt);
            }

            if (GameMenuHandler.selectedCharacterContext.abilityLineupInfo.getSelectedAbility() == this)
            {
                if (!selectionTimer.IsActive() && bBuildup)
                {
                    bBuildup       = false;
                    selectionTimer = new TimingUtility(32, true, StopSelectionTimerWhen);
                    selectionTimer.SetStepTimer(30);
                }
                else if (!selectionTimer.IsActive() && !bBuildup)
                {
                    bBuildup       = true;
                    selectionTimer = new TimingUtility(32, true, StopSelectionTimerWhen);
                    selectionTimer.SetStepTimer(30);
                }
            }
            else if (selectionTimer != null && !selectionTimer.IsActive() && bBuildup)
            {
                selectionTimer = new TimingUtility(8, true, StopSelectionTimerWhen);
                selectionTimer.SetStepTimer(30);
                bBuildup = false;
            }
            else if (selectionTimer != null && !selectionTimer.IsActive() && !bBuildup)
            {
                selectionTimer = null;
                bBuildup       = true;
            }

            parent.abilityIcon.UpdateAnimationForItems(gt);
        }
Ejemplo n.º 6
0
        internal AbilitySelectDescription(BaseCharacter bc, BasicAbility ba, Rectangle screenPos)
        {
            if (bInitialize)
            {
                Initialize();
            }
            parent = ba;
            // GameProcessor.gcDB
            drawOnScreen = screenPos;
            pos          = new Rectangle(new Point(), screenPos.Size);

            render = new RenderTarget2D(Game1.graphics.GraphicsDevice, pos.Width, pos.Height);
            panel  = new TexPanel(guiTex, pos, new Rectangle(90, 679, 64, 2), new Rectangle(90, 745, 64, 2), new Rectangle(88, 681, 2, 64), new Rectangle(154, 681, 2, 64), new Rectangle(88, 679, 2, 2), new Rectangle(154, 679, 2, 2), new Rectangle(88, 745, 2, 2), new Rectangle(154, 745, 2, 2), new Rectangle(90, 681, 64, 64));

            startUpTimer = new TimingUtility(16, true, StartUpTimer);
            startUpTimer.SetStepTimer(startUpStepTimer);

            titleBox       = new Rectangle(offsetPanel, offsetPanel, render.Width - 2 * offsetPanel, titleBoxHeight);
            descriptionBox = new Rectangle(titleBox.Location + new Point(0, titleBoxHeight + offsetBoxes), new Point(render.Width - 2 * offsetPanel));
            aoeBox         = new Rectangle(new Point(0, descriptionBox.Y + descriptionBox.Height + offsetBoxes), new Point(render.Width - 2 * offsetPanel));
            potencyText    = ba.GetEstimatedPotency(bc);
        }
Ejemplo n.º 7
0
        internal void Update(GameTime gt)
        {
            for (int i = 0; i < equippedAbilities.Count; i++)
            {
                equippedAbilities[i].Update(gt);
            }

            for (int i = 0; i < availableAbilities.Count; i++)
            {
                availableAbilities[i].Update(gt);
            }

            if (selectedAbility != null && selectedAbility.asd != null)
            {
                selectedAbility.asd.Update(gt);
            }

            selectionTimer.Tick(gt);
            if (bBuildUp)
            {
                if (!selectionTimer.IsActive())
                {
                    bBuildUp       = false;
                    selectionTimer = new TimingUtility(30, true, StopSelectionTimerWhen);
                    selectionTimer.SetStepTimer(40);
                }
            }
            else
            {
                if (!selectionTimer.IsActive())
                {
                    bBuildUp       = true;
                    selectionTimer = new TimingUtility(30, true, StopSelectionTimerWhen);
                    selectionTimer.SetStepTimer(40);
                }
            }
        }
Ejemplo n.º 8
0
 internal void unSelectTimer()
 {
     unselectTimer = new TimingUtility(16, true, StopSelectionTimerWhen);
     unselectTimer.SetStepTimer(40);
 }
 static internal void Reset()
 {
     bBuildUp = true;
     texTimer = new TimingUtility(16, true, timerEnd);
     texTimer.SetStepTimer(120);
 }
Ejemplo n.º 10
0
 internal void Select()
 {
     GameMenuHandler.selectedCharacterContext.abilityLineupInfo.setSelectedAbility(this);
     selectionTimer = new TimingUtility(32, true, StopSelectionTimerWhen);
     selectionTimer.SetStepTimer(30);
 }