public void startLevel(int level) { int xPos = 20; int yPos = 20; CombatBoard board = this.combatScreen.MyCombatBoard; List <Human> humans = board.getHumans(); foreach (Human human in humans) { CombatHUDPanel humanPanel = new CombatHUDPanel(lhg, human); humanPanel.Position = new Vector2(xPos, yPos); yPos += 75; humanPanels.Add(humanPanel); } xPos = 200; yPos = 20; List <Zombie> zombies = board.getZombies(); foreach (Zombie zombie in zombies) { CombatHUDPanel zombiePanel = new CombatHUDPanel(lhg, zombie); zombiePanel.Position = new Vector2(xPos, yPos); zombiePanels.Add(zombiePanel); } }
public override void Draw(GameTime gameTime) { foreach (CombatHUDPanel humanPanel in humanPanels) { humanPanel.Draw(gameTime); } Player player = CurrentPlayer; if (player.MyType == Player.Type.Zombie) { CombatHUDPanel zombiePanel = getZombiePanel((Zombie)player); zombiePanel.Draw(gameTime); } }