more naming convention

now there are spawn objects!
now entity spawns are loaded from level!
now entity spawns are saved to level!
This commit is contained in:
lustlion
2022-03-08 09:34:51 +01:00
parent a8ffae726f
commit 0acbfd5e9d
24 changed files with 165 additions and 139 deletions

View File

@@ -10,10 +10,10 @@ LoadedObjects.Rooms = {}
--[[
Collision
[bool flag] isDisabled
[bool flag] is_disabled
> if true used for collision
[bool flag] isColliding
[bool flag] is_colliding
> if true, this collision is colliding
[vec2 position] from - x, y
@@ -31,7 +31,7 @@ LoadedObjects.Rooms = {}
-- can also be called with only ox and oy, where they become the width and height instead
function Collision:new(ox,oy,tx,ty)
local o = {isColliding = false, isDisabled = false}
local o = {is_colliding = false, is_disabled = false}
if tx ~= nil and ty ~= nil then
o.from = {x = ox, y = oy}
@@ -77,7 +77,7 @@ function Collision:containsPoint(x, y)
end
function Collision:draw(color)
if self.isColliding == true then
if self.is_colliding == true then
love.graphics.setColor(0,1,0,0.5)
elseif color == 1 then
love.graphics.setColor(1,0,0,0.5)