public void Draw(SpriteBatch spriteBatch) { //spriteBatch.Begin(); bg.Draw(spriteBatch); playerX.DrawFrame(spriteBatch, posplayer, direction); for (int i = 0; i < platfroms.Count; i++) { platfroms[i].Draw(spriteBatch); } for (int i = 0; i < coinss.Count; i++) { coinss[i].Draw(spriteBatch); } /*foreach (Platform platform in platfroms) * platform.Draw(spriteBatch);*/ hp.Draw(spriteBatch); spriteBatch.DrawString(font, "jump : " + jumpplayer, new Vector2(200, 260), Color.Black); spriteBatch.DrawString(font, "g : " + gravity, new Vector2(200, 275), Color.Black); spriteBatch.DrawString(font, "foce : " + foce, new Vector2(200, 300), Color.Black); spriteBatch.DrawString(font, "count : " + count, new Vector2(200, 315), Color.Black); spriteBatch.DrawString(font, "lazer : " + lazer.poslazer, new Vector2(400, 260), Color.Black); spriteBatch.DrawString(font, "check : " + check, new Vector2(400, 275), Color.Black); spriteBatch.DrawString(font, "playercol : " + playercol, new Vector2(400, 305), Color.Black); spriteBatch.DrawString(font, "checktime : " + counttime, new Vector2(400, 320), Color.Black); spriteBatch.DrawString(font, "score : " + score, new Vector2(700, 100), Color.Black); if (shoot == true) { lazer.Draw(spriteBatch); if (lazer.poslazer.X >= 800) { shoot = false; } } //spriteBatch.End(); }
public void Draw(SpriteBatch spriteBatch) { cointex.DrawFrame(spriteBatch, (poscoin - cameraPos)); }