示例#1
0
        private void AddSmoke(int miniX, int miniY)
        {
            Vector2       location      = new Vector2((miniX * gridSquare) + topLeftMiniXCenter, (miniY * gridSquare) + topLeftMiniYCenter);
            SmokeParticle smokeParticle = new SmokeParticle(location, new Vector2(64, 64), Color.White, 0f);

            smokeParticleList.Add(smokeParticle);
        }
示例#2
0
        private void DrawSmoke(SpriteBatch spriteBatch)
        {
            for (int i = smokeParticleList.Count - 1; i > -1; i--)
            {
                SmokeParticle smokeParticle = smokeParticleList[i];
                smokeParticle.DrawUpdate();
                smokeParticle.Draw(spriteBatch);

                if (smokeParticle.destroy)
                {
                    smokeParticleList.RemoveAt(i);
                }
            }
        }