public void Draw(SpriteBatch spriteBatch) { // Draw the Tail spriteBatch.Draw(theTail.sprite, theTail.position, Color.White); // Draw the Body Parts for (int i = theParasite.Count - 1; i >= 0; i--) { ParasiteBodyPart bodyPart = theParasite[i]; spriteBatch.Draw(bodyPart.sprite, bodyPart.position, Color.White); } // Draw the Head spriteBatch.Draw(theHead.sprite, theHead.position, Color.White); }
public void createBodyParts() { // Create the Head theHead = new ParasiteBodyPart(content.Load <Texture2D>("Sprites\\Head"), 3); // Create the Body Parts for (int i = 0; i < numSegments; i++) { ParasiteBodyPart bPart = new ParasiteBodyPart(content.Load <Texture2D>("Sprites\\Part"), 1); theParasite.Add(bPart); } // Create the Tail theTail = new ParasiteBodyPart(content.Load <Texture2D>("Sprites\\Tail"), 1); }