From: Andy Belle-Isle Date: Mon, 7 Oct 2019 22:35:47 +0000 (-0400) Subject: Added ability to change rendering offsets and sizes X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=5f53889d4357d8dba6e726ed38358eca96dbeb47;p=clyne%2Fgamedev2.git Added ability to change rendering offsets and sizes --- diff --git a/Scripts/init.lua b/Scripts/init.lua index 34e464b..46fe040 100644 --- a/Scripts/init.lua +++ b/Scripts/init.lua @@ -34,24 +34,24 @@ player = { x = 0.0, y = 0.0 }, - Hitbox = { - bounds = { + Physics = { + gravity = true, + hitbox = { {x = -0.5, y = -0.8}, {x = 0.5, y = -0.8}, {x = -0.5, y = 0.8}, {x = 0.5, y = 0.8}, } }, - Physics = 0, Name = "bord", Render = { texture = "Assets/player.png", visible = true, - bounds = { - {x = -0.5, y = -0.8}, - {x = 0.5, y = -0.8}, - {x = -0.5, y = 0.8}, - {x = 0.5, y = 0.8}, + offset = { + ll = {x = -0.5, y = -0.8}, + lr = {x = 0.5, y = -0.8}, + ul = {x = -0.5, y = 0.8}, + ur = {x = 0.5, y = 0.8}, } }, Light = { diff --git a/src/components/Component.hpp b/src/components/Component.hpp index 538d42b..5b0e3af 100644 --- a/src/components/Component.hpp +++ b/src/components/Component.hpp @@ -24,6 +24,8 @@ #include #include +#include + #include