MCPcopy Create free account
hub / github.com/marblexu/PythonPlantsVsZombies / draw

Method draw

source/state/level.py:530–549  ·  view source on GitHub ↗
(self, surface)

Source from the content-addressed store, hash-verified

528 zombie.drawFreezeTrap(surface)
529
530 def draw(self, surface):
531 self.level.blit(self.background, self.viewport, self.viewport)
532 surface.blit(self.level, (0,0), self.viewport)
533 if self.state == c.CHOOSE:
534 self.panel.draw(surface)
535 elif self.state == c.PLAY:
536 self.menubar.draw(surface)
537 for i in range(self.map_y_len):
538 self.plant_groups[i].draw(surface)
539 self.zombie_groups[i].draw(surface)
540 self.hypno_zombie_groups[i].draw(surface)
541 self.bullet_groups[i].draw(surface)
542 self.drawZombieFreezeTrap(i, surface)
543 for car in self.cars:
544 car.draw(surface)
545 self.head_group.draw(surface)
546 self.sun_group.draw(surface)
547
548 if self.drag_plant:
549 self.drawMouseShow(surface)

Callers 1

updateMethod · 0.95

Calls 2

drawZombieFreezeTrapMethod · 0.95
drawMouseShowMethod · 0.95

Tested by

no test coverage detected