def __init__(self, position=np.array([0.0, 0.0])): color = [[[config.BOMB_BG_COL, config.BOMB_COL]]] velocity = np.array([config.BOMB_SPEED_X, config.BOMB_SPEED_Y]) figure_string = graphics.BOMB figure = utils.str_to_array(figure_string) super().__init__(figure=figure, position=position, color=color, velocity=velocity)
def __init__( self, position=np.array([0.0, 0.0]), velocity=np.array([config.POWER_SPEED_X, config.POWER_SPEED_Y]), ): figure_string = graphics.EXPAND_PADDLE figure = utils.str_to_array(figure_string) super().__init__(figure=figure, position=position, type_power="e", velocity=velocity)
def __init__(self, position=np.array([0.0, 0.0]), velocity=np.array([0.0, 0.0])): color = [[[config.BALL_BG_COL, config.BALL_COL]]] figure_string = graphics.BALL figure = utils.str_to_array(figure_string) self._strong = False # self._fire = False super().__init__(figure=figure, position=position, color=color, velocity=velocity)
def __init__(self): color = [[[config.BOSS_BG_COL, config.BOSS_COL]]] figure_string = graphics.BOSS figure = utils.str_to_array(figure_string) h, w = figure.shape position = np.array([(config.WIDTH - w) // 2, 0]) velocity = np.array([0.0, 0.0]) self._health = 20 self._def = 0 super().__init__(figure=figure, position=position, color=color, velocity=velocity)
def __init__(self, health=0, position=np.array([0.0, 0.0]), typeBrick="n"): self._health = health self._collisions = 0 self._type = typeBrick config_bg_color = "BRICK_BG_COL_" + str(health) config_color = "BRICK_COL_" + str(health) color_bg_string = getattr(config, config_bg_color) color_string = getattr(config, config_color) color = [[[color_bg_string, color_string]]] figure_string = graphics.BRICK figure = utils.str_to_array(figure_string) super().__init__(figure=figure, position=position, color=color)