Ejemplo n.º 1
0
 public void Draw(ref Graphics g, float originX, float originY, float scale, float offsetX, float offsetY, float brushSize)
 {
     L1.Draw(ref g, originX, originY, scale, offsetX, offsetY, brushSize);
     L2.Draw(ref g, originX, originY, scale, offsetX, offsetY, brushSize);
     L3.Draw(ref g, originX, originY, scale, offsetX, offsetY, brushSize);
     L4.Draw(ref g, originX, originY, scale, offsetX, offsetY, brushSize);
 }
Ejemplo n.º 2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (!start && !hasLost)
            {
                string hello = "Press Enter to Begin!";
                spriteBatch.DrawString(myFont, hello, new Vector2(300, 300), Color.White);
                L3.Draw(spriteBatch);
                L1.Draw(spriteBatch);
                L2.Draw(spriteBatch);
            }
            else if (hasLost)
            {
                string lost = "You have died! Press Enter to restart.";
                spriteBatch.DrawString(myFont, lost, new Vector2(300, 300), Color.White);
            }
            else if (start)
            {
                foreach (SuperClass g in gameObjs)
                {
                    if (g != null)
                    {
                        g.Draw(spriteBatch);
                    }
                }
                foreach (Bubble bub in gameObjList.OfType <Bubble>())
                {
                    bub.Draw(spriteBatch);
                }
                string pts  = "Score: " + SuperClass.score;
                string life = "Energy: " + Player.energy;

                spriteBatch.DrawString(myFont, pts, new Vector2(6, 6), Color.Yellow);
                spriteBatch.DrawString(myFont, life, new Vector2(800, 6), Color.Wheat);
            }
        }