New lighting!

This commit is contained in:
lustlion
2021-10-27 11:06:08 +02:00
parent 5e1148f49d
commit 538a1f77f8
11 changed files with 158 additions and 91 deletions

View File

@@ -15,6 +15,7 @@ function Entity:New(x,y)
o.sprite_scale = {x = 1, y = 1}
o.sprite_rotation = math.rad(0)
o.sprite_flip = { x = 1, y = 1}
o.illuminated = false
setmetatable(o, self)
self.__index = self
return o
@@ -113,7 +114,7 @@ function DrawAnimation(animation, x, y, rotate, sx, sy)
end
function Entity:Animate()
if game_paused ~= true then
if game_paused ~= true and self.anim.path ~= nil then
-- try to animate
self.anim.subframe = self.anim.subframe + current_dt