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;
            }
        }
Esempio n. 2
0
        public virtual void Update(GameTime gameTime)
        {
            previousMouse = currentMouse;
            currentMouse  = Mouse.GetState();

            SetCollisionZone(LevelMechanics.GetCurrentOffset());
        }
 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()));
         }
     }
 }
Esempio n. 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()));
            }
        }
Esempio n. 5
0
 public virtual void Initialize()
 {
     SetCollisionZone(LevelMechanics.GetCurrentOffset());
 }