def draw(self, debug=False): if debug: if self.hit_counter: color = arcade.color.RED elif self.attack_counter: color = arcade.color.GREEN elif self.block_counter: if self.block_counter <= BLOCK_ACTIVE_TIME: color = arcade.color.PINK else: color = arcade.color.ORANGE else: color = arcade.color.BLUE if self.level_state == LevelStates.low and self.center_y == Y_BASELINE: arcade.draw_rectangle_filled(self.center_x, self.center_y, self.width, self.height // 2, color) else: arcade.draw_rectangle_filled(self.center_x, self.center_y, self.width, self.height, color) # Update Textures self.update_animation() draw_texture_rectangle(self.center_x, self.center_y, self.width * 4, self.height, self.texture) self.render_healthbar()
def draw(self): """ Draw the sprite. """ draw_texture_rectangle(self.center_x, self.center_y, self.width, self.height, self._texture, self.angle, self.alpha, # TODO: review this function repeat_count_x=self.repeat_count_x, repeat_count_y=self.repeat_count_y)
def draw(self): """ Draw the sprite. """ draw_texture_rectangle(self.center_x, self.center_y, self.width, self.height, self.texture, self.angle, self.alpha, self.transparent, repeat_count_x=self.repeat_count_x, repeat_count_y=self.repeat_count_y)
def draw(self): """ Draw the sprite. """ if self._alpha != 255: transparent = False else: transparent = True draw_texture_rectangle(self.center_x, self.center_y, self.width, self.height, self._texture, self.angle, self.alpha, # TODO: review this function repeat_count_x=self.repeat_count_x, repeat_count_y=self.repeat_count_y)
def draw(self): """ Draw the sprite. """ draw_texture_rectangle(self.center_x, self.center_y, self.width, self.height, self.texture, self.angle, self.alpha, self.transparent)
def draw_background(): map_texture = draw_commands.load_texture(config.MAP_BACKGROUND) draw_commands.draw_texture_rectangle(center_x=config.SCREEN_WIDTH / 2, center_y=config.SCREEN_HEIGHT / 2, width=config.SCREEN_WIDTH, height=config.SCREEN_HEIGHT, texture=map_texture)