Beispiel #1
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()));
            }
        }
Beispiel #2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            int lowerPos  = LevelMechanics.GetLowerPosition();
            int higherPos = LevelMechanics.GetHigherPosition();

            for (int m = lowerPos; m < higherPos; m++)
            {
                //Breaks loop if index going out of bounds.
                if (m >= timings.GetLength(0))
                {
                    break;
                }

                timeVector[m].Draw(spriteBatch, font);
            }
        }
Beispiel #3
0
        public void Draw(SpriteBatch spriteBatch)
        {
            for (int n = 0; n < GetWidth(); n++)
            {
                int lowerPos  = LevelMechanics.GetLowerPosition();
                int higherPos = LevelMechanics.GetHigherPosition();

                for (int m = lowerPos; m < higherPos; m++)
                {
                    //Breaks loop if going outside bounds.
                    if (m >= GetHeight())
                    {
                        break;
                    }

                    grid[n, m].Draw(spriteBatch);
                }
            }
        }