def __init__(self): self.rect = Rect(ARENA_LEFT_POS, ARENA_TOP_POS, ARENA_LEFT_POS + ARENA_WIDTH, ARENA_TOP_POS + ARENA_HEIGHT) self._cache = {} if Global.yume.test_mode: self.background = get_gfx(gfx.TestBackground, (1, 1)) else: [gfx.get_surface(gfx.Background, i, 'Background') for i in range(gfx.Background.frames)] self.background = get_gfx(gfx.Background, (1, 1)) self.bg_tick = 0
def __init__(self): self.arena = Arena() Global.arena = self.arena self.adrenbar = get_gfx(gfx.AdrenalineBar, (1, )) self.adrenbar_x = -self.adrenbar.width self.adren_costbar = get_gfx(gfx.AdrenalineCostBar, (1, )) self.manabar = get_gfx(gfx.ManaBar, (1, )) self.manabar_x = -self.manabar.width self.costbar = get_gfx(gfx.CostBar, (1, )) self.costbar_x = -self.costbar.width self.game_paused = False self.initialize_buttons() self.load_level(Level1)
def drag(self, obj): self.dragging = obj self.dragged_surface = get_gfx(obj.graphic, (1, 1), transparency=True).surface