Example #1
0
        public void Update(GameTime gameTime)
        {
            foreach (var effect in activeSprays)
            {
                effect.Update(gameTime);
            }

            for (int i = activeBursts.Count - 1; i >= 0; i--)
            {
                activeBursts[i].Update(gameTime);

                if (activeBursts[i].Done)
                {
                    activeBursts.Remove(activeBursts[i]);
                }
            }

            for (int i = ActiveAbsorbs.Count - 1; i >= 0; i--)
            {
                ActiveAbsorbs[i].Update(gameTime);

                if (ActiveAbsorbs[i].Done)
                {
                    ActiveAbsorbs.Remove(ActiveAbsorbs[i]);
                }
            }

            for (int i = ActiveBlocks.Count - 1; i >= 0; i--)
            {
                ActiveBlocks[i].Update(gameTime);

                if (ActiveBlocks[i].Done)
                {
                    _gamePlayScreen.NowIsBlock(ActiveBlocks[i].LastElement, ActiveBlocks[i].ChoosenBlock);
                    ActiveBlocks.Remove(ActiveBlocks[i]);
                }
            }

            for (int i = ActiveScores.Count - 1; i >= 0; i--)
            {
                ActiveScores[i].Update(gameTime);

                if (ActiveScores[i].Done)
                {
                    ActiveScores.Remove(ActiveScores[i]);
                }
            }
        }