def draw(self): maxHP = self.ui.player.getMaxHP() currentHP = self.ui.player.getHP() playerx, playery = self.ui.player.getXY() depth = self.getLevel().getDepth() self.render_bar(1, 1, 18, "HP", currentHP, maxHP, colors.darkBlue, colors.darkRed) if (G.getDebugValue("showCoords")): self.showCoords(1, 3, playerx, playery, depth)
def drawLevel(self, playerx, playery): debug = G.getDebugValue("showPaths") # Set camera position self.positionCamera(playerx, playery) # Get tiles tilesToDraw = self.getLevel().getTilesToDraw(playerx, playery, self.cameraDims()) # Draw monster paths if debug: creaturePathTiles = [] for cr in self.getLevel().getLivingCreatures(): path = cr.getPath() if path: creaturePathTiles += path for (x, y, symbol, color, background) in tilesToDraw: if debug: if (x, y) in creaturePathTiles: color = colors.colorDebugPath self.putChar(symbol, x - self.camx, y - self.camy, color, background)