Пример #1
0
 def draw(self):
     if self.preview:
         self.preview.draw(display)
         #subdivisions label
         image = render.string(str(self.preview.subdivisions), COLOR3)
         w, h = self.font.size(str(self.preview.subdivisions))
         display.blit(image, (self.mx - w, self.my - h))
     
     for block in self.level.blocks:
         block.draw(display)
     for plan in self.level.plans:
         plan.draw(display)
     
     self.mode.draw(display)
     if self.hoveredPlanTouched:
         display.blit(self.hoveredPlan.hitImage, self.hoveredPlan.rect)
         pygame.draw.circle(display, COLOR1, (self.mx, self.my), 2)
Пример #2
0
 def balls(self, x):
     self._balls = x
     self.balls_image = render.string("Balls: %i" %self.balls, COLOR1)
Пример #3
0
 def score(self, x):
     self._score = x
     self.score_image = render.string("Score: %i" %self.score, COLOR1)