function Graphics:loadAnimations(dir, prefix) if self.cache.anims[prefix] then return self.cache.anims[prefix] end local sheet = self:loadSpriteTable(dir, prefix .. "Spr-0") local anims = TH.anims() print(anims) anims:setSheet(sheet) if not anims:load( self.app:readDataFile(dir, prefix .. "Start-1.ani"), self.app:readDataFile(dir, prefix .. "Fra-1.ani"), self.app:readDataFile(dir, prefix .. "List-1.ani"), self.app:readDataFile(dir, prefix .. "Ele-1.ani")) then error("Cannot load animations " .. prefix) end self.cache.anims[prefix] = anims self.load_info[anims] = {self.loadAnimations, self, dir, prefix} return anims end