diff options
Diffstat (limited to 'lua/pets/pet.lua')
| -rw-r--r-- | lua/pets/pet.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/pets/pet.lua b/lua/pets/pet.lua new file mode 100644 index 0000000..4179b38 --- /dev/null +++ b/lua/pets/pet.lua @@ -0,0 +1,19 @@ +local M = {} +M.Pet = {} +M.Pet.__index = M.Pet + +function M.Pet.new(name, type, style) + local instance = setmetatable({}, M.Pet) + instance.name = name + instance.type = type + instance.style = style + local wd = "/mnt/shared/coding/lua/plugins/pets.nvim/media/" -- TODO: adapt to use the correct path when plugin is installed + instance.sourcedir = wd .. type .. "/" .. style .. "/" + return instance +end + +function M.Pet:animate(bufnr) + require("pets.animations").animate(bufnr, self.sourcedir) +end + +return M |