Exemple #1
0
        public override void Update(GameTime gameTime)
        {
            UpdateMouse();

            SquareClick squareClick = null;

            for (int n = 0; n < GetWidth(); n++)
            {
                for (int m = 0; m < GetHeight(); m++)
                {
                    grid[n, m].Update(gameTime);
                    grid[n, m].SetOffset(new Vector2(0, LevelMechanics.GetCurrentOffset()));

                    if (grid[n, m].HasClickInformation())
                    {
                        squareClick = grid[n, m].GetClickInformation();
                    }
                }
            }

            if (squareClick != null)
            {
                ClickLogic(squareClick);
            }
            else if (isRightClicked && IsSquareMarked())
            {
                markedClick = null;
            }
        }
        public virtual void Update(GameTime gameTime)
        {
            previousMouse = currentMouse;
            currentMouse  = Mouse.GetState();

            SetCollisionZone(LevelMechanics.GetCurrentOffset());
        }
Exemple #3
0
 public override void Update(GameTime gameTime)
 {
     for (int n = 0; n < GetWidth(); n++)
     {
         for (int m = 0; m < GetHeight(); m++)
         {
             grid[n, m].Update(gameTime);
             grid[n, m].SetOffset(new Vector2(0, LevelMechanics.GetCurrentOffset()));
         }
     }
 }
Exemple #4
0
        public void Update(GameTime gameTime)
        {
            for (int m = LevelMechanics.GetLowerPosition(); m < LevelMechanics.GetHigherPosition(); m++)
            {
                if (m >= timings.GetLength(0))
                {
                    break;
                }

                timeVector[m].Update(gameTime);
                timeVector[m].SetOffset(new Vector2(0, LevelMechanics.GetCurrentOffset()));
            }
        }
 public virtual void Initialize()
 {
     SetCollisionZone(LevelMechanics.GetCurrentOffset());
 }