def draw(self, dt=0): if self.blackout: draw.set_color(0,0,0,1) draw.rect(0, 0, gamestate.norm_w, gamestate.norm_h) return self.env.behind.blit(0,0,0) with camera.apply_camera(self.camera): if self.main_group: self.main_group.x = self.x_offset self.main_group.y = self.y_offset with pushmatrix(pyglet.gl.glTranslatef, self.x_offset, self.y_offset, 0): self.env.draw() self.shadow.draw() self.batch.draw() self.env.draw_overlay() self.convo.draw() convos_to_remove = set() for c in self.background_convos: c.draw() if not c.active: convos_to_remove.add(c) for c in convos_to_remove: c.delete() self.background_convos.remove(c)
def draw(self, dt=0): if self.blackout: draw.set_color(0, 0, 0, 1) draw.rect(0, 0, gamestate.norm_w, gamestate.norm_h) return self.env.behind.blit(0, 0, 0) with camera.apply_camera(self.camera): if self.main_group: self.main_group.x = self.x_offset self.main_group.y = self.y_offset with pushmatrix(pyglet.gl.glTranslatef, self.x_offset, self.y_offset, 0): self.env.draw() self.shadow.draw() self.batch.draw() self.env.draw_overlay() self.convo.draw() convos_to_remove = set() for c in self.background_convos: c.draw() if not c.active: convos_to_remove.add(c) for c in convos_to_remove: c.delete() self.background_convos.remove(c)
def draw(self, dt=0): with camera.apply_camera(self.camera): self.batch.draw()
def draw(self, dt=0): with camera.apply_camera(self.camera): images.background.blit_tiled(0, 0, 0, self.pixelwidth, self.pixelheight) self.batch.draw() self.hud_batch.draw()