コード例 #1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (userInterface.canPlaceCannonTower || userInterface.canPlaceMagicTower)
            {
                Tower tower = new Tower(TextureManager.towerTexture, new Vector2(Mouse.GetState().X, Mouse.GetState().Y));

                if (CanPlace(tower))
                {
                    tower.SetColor = Color.Green;
                }
                else
                {
                    tower.SetColor = Color.Red;
                }

                tower.Draw(spriteBatch);
            }

            foreach (Tower t in towers)
            {
                t.Draw(spriteBatch);
                t.DrawTowerRange(spriteBatch);
            }


            creepManager.Draw(spriteBatch);
            projectileManager.Draw(spriteBatch);
            particleEngine.Draw(spriteBatch);
            userInterface.Draw(spriteBatch);
        }
コード例 #2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     foreach (Projectile p in projectiles)
     {
         p.Draw(spriteBatch);
     }
     hitFrostParticleEngine.Draw(spriteBatch);
     hitCannonParticleEngine.Draw(spriteBatch);
 }
コード例 #3
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     base.Draw(spriteBatch);
     particleEngine.Draw(spriteBatch);
 }