Exemplo n.º 1
0
        public void Draw()
        {
            if (isVisible)
            {
                sprite.Draw();
            }

            if (isAlive)
            {
                for (int i = 0; i < bullets.Length; i++)
                {
                    if (bullets[i].IsAlive)
                    {
                        bullets[i].Draw();
                    }

                    //Vector2 pos = bullets[i].Position;
                    //GfxTools.DrawRect((int)pos.X, (int)pos.Y, bullets[i].Height, bullets[i].GetWidth()/2, new ColorRGB(0, 0, 255));
                }

                for (int i = 0; i < heartsEnergy.Length; i++)
                {
                    if (heartsEnergy[i] != null)
                    {
                        heartsEnergy[i].Draw();
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void Draw()
 {
     sprite.Draw();
     //Vector2 pixelPos = new Vector2(position.X - Width / 2, position.Y - Height / 2);
     //GfxTools.DrawRect((int) pixelPos.X, (int) pixelPos.Y, 5, 5, new ColorRGB(0, 0, 255));
 }