/// <summary> /// Renders this gamestate. /// </summary> /// <param name="r">Renderer to use.</param> public void render(Renderer r) { r.begin(view); r.render(bgRenderable, new Physics(0.0f)); render(r, projectiles); render(r, hostiles); renderHBar(r, hostiles); render(r, nonInteractives); render(r, players); renderHBar(r, players); render(r, gameObjectives); renderHBar(r, gameObjectives); render(r, hostileProjectiles); renderTimeBar(r); Vector2 rpos = new Vector2(50, r.Screenspace.Size.Y / (players.Count + 1)); foreach (Entity p in this.players) { renderCooldowns(r, p, rpos); rpos.Y += r.Screenspace.Size.Y / (players.Count + 1); } int playerNo = 1; foreach (Entity p in players) { Vector2 scorePos = new Vector2(r.Screenspace.Size.X - 215, 50 + playerNo * 25); r.renderText("Player " + playerNo++ + " kills: " + p.Stats.Kills, scorePos, Color.White); } }
public void render(Renderer r) { r.beginScreen(); Vector2 pos = 50 * Vector2.One; foreach (PlayerIndex p in controllers) { r.renderText(String.Format("Player {0} is connected", p), pos, Color.White, false); pos += 30 * Vector2.UnitY; } r.end(); }
public void render(Renderer r) { r.beginScreen(); r.renderText("Player X paused the game.", 0.5f * Vector2.One, Color.White, false); r.end(); }