From a62d96ad0521b064e6ef61a6f80888e27966502b Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Tue, 1 Oct 2019 02:01:20 -0400 Subject: Started texture based world definitions --- Scripts/world.lua | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Scripts') diff --git a/Scripts/world.lua b/Scripts/world.lua index 3b56d9a..40d7218 100644 --- a/Scripts/world.lua +++ b/Scripts/world.lua @@ -7,7 +7,6 @@ world = { Register = function(self) -- TODO make world have global textures to speed up rendering - self:registerMaterial("grass", { -- TODO combine both of these into 1 texture = { @@ -110,3 +109,25 @@ world = { --world:Generate() game.worldRegister(world) + +newWorld = { + Register = function(self) + self.unitSize = 8; + self:createLayer(0, { + texture = { file = "Assets/world/world1/layers/0/texture.png" }, + normal = { file = "Assets/world/world1/layers/0/normal.png" }, + hitbox = { file = "Assets/world/world1/layers/0/hitbox.png" } + }); + self:createLayer(1, { + texture = { file = "Assets/world/world1/layers/1/texture.png" }, + normal = { file = "Assets/world/world1/layers/1/normal.png" }, + hitbox = { file = "Assets/world/world1/layers/1/hitbox.png" } + }); + self:createDecoLayer(10, { + texture = { file = "Assets/world/world1/layers/deco/texture.png" }, + normal = { file = "Assets/world/world1/layers/deco/normal.png" }, + }); + end, + Generate = function(self) end +} +game.worldRegister(newWorld); -- cgit v1.2.3