def draw(self): if not vista.isvisible((self.x, self.y), self.radius): return pos = vista.worldtoscreen((self.x, self.y)) r = int(vista.scale * random.uniform(0.1, 0.4)) c = random.randint(0, 255) pygame.draw.circle(vista.screen, (c, c, 255), pos, r)
def draw(self): if not vista.isvisible((self.x, self.y), self.radius): return for escort in self.escorts: if escort.hp > 0: vista.drawbolt((self.x, self.y), (escort.x, escort.y), (100, 100, 255)) ships.Ship.draw(self)
def drawviewport(self): import vista, img a = starmap.getoort((self.you.x, self.you.y)) vista.screen.fill((0, int(80 * a), int(60 * a))) vista.drawstars() for t in self.things: t.draw() for s in self.ships: s.draw() for e in self.effects: e.draw() for iname in self.interests: obj = getattr(self, iname) if not vista.isvisible((obj.x, obj.y), obj.radius - 1): pos, angle = vista.indpos((obj.x, obj.y)) img.worlddraw("arrow", pos, angle = angle) img.drawtext(settings.inames[iname], F(20), (0, 255, 255), fontname = "teko", center = vista.worldtoscreen(pos))
def drawviewport(self): import vista, img a = starmap.getoort((self.you.x, self.you.y)) vista.screen.fill((0, int(80 * a), int(60 * a))) vista.drawstars() for t in self.things: t.draw() for s in self.ships: s.draw() for e in self.effects: e.draw() for iname in self.interests: obj = getattr(self, iname) if not vista.isvisible((obj.x, obj.y), obj.radius - 1): pos, angle = vista.indpos((obj.x, obj.y)) img.worlddraw("arrow", pos, angle=angle) img.drawtext(settings.inames[iname], F(20), (0, 255, 255), fontname="teko", center=vista.worldtoscreen(pos))
def draw(self): if not vista.isvisible((self.x, self.y), self.radius): return img.worlddraw(self.imgname, (self.x, self.y), angle=self.angle, scale=self.scale0)
def draw(self): if not vista.isvisible((self.x, self.y), self.radius): return img.worlddraw(self.imgname, (self.x, self.y), angle = self.angle, scale = self.scale0)
def draw(self): if not vista.isvisible((self.x, self.y), self.radius): return imgname = ("antisun-%s" if self.collapsed else "sun-%s") % self.radius img.worlddraw(imgname, (self.x, self.y), scale = 1)