From 1c167ba5666a5413bc4f73cf9f498cf887032a96 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 29 Apr 2019 21:23:51 +0200 Subject: [PATCH] example/plateform: add asset loading --- examples/gameplay/plateform/assets/init.lua | 5 +++++ examples/gameplay/plateform/init.lua | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 examples/gameplay/plateform/assets/init.lua diff --git a/examples/gameplay/plateform/assets/init.lua b/examples/gameplay/plateform/assets/init.lua new file mode 100644 index 0000000..b47c8be --- /dev/null +++ b/examples/gameplay/plateform/assets/init.lua @@ -0,0 +1,5 @@ +return { + ["sprites"] = { + {"player", "examples/gameplay/plateform/assets/monkey_lad"} + } +} diff --git a/examples/gameplay/plateform/init.lua b/examples/gameplay/plateform/init.lua index 2d5bfa0..d03a06c 100644 --- a/examples/gameplay/plateform/init.lua +++ b/examples/gameplay/plateform/init.lua @@ -31,6 +31,8 @@ function Plateformer:new() local folder = "examples.gameplay.plateform" + self.assets:batchImport("examples.gameplay.plateform.assets") + self.world = World(self, folder .. ".actors", "examples/gameplay/plateform/assets/platformer.lua") end