mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
forgot one check
This commit is contained in:
parent
d02bc54b05
commit
207840c2cc
@ -1,5 +1,4 @@
|
|||||||
:todoing
|
:todoing
|
||||||
-make sure all draw calls check if the object is within range
|
|
||||||
-add body animations
|
-add body animations
|
||||||
-optimize shadow body calculations and drawing methods
|
-optimize shadow body calculations and drawing methods
|
||||||
|
|
||||||
|
@ -182,8 +182,10 @@ function light_world:drawRefraction(l,t,w,h,s)
|
|||||||
self.refractionMap:clear()
|
self.refractionMap:clear()
|
||||||
util.drawto(self.refractionMap, l, t, s, function()
|
util.drawto(self.refractionMap, l, t, s, function()
|
||||||
for i = 1, #self.body do
|
for i = 1, #self.body do
|
||||||
|
if self.body[i]:isInRange(l,t,w,h,s) then
|
||||||
self.body[i]:drawRefraction()
|
self.body[i]:drawRefraction()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
util.drawCanvasToCanvas(self.render_buffer, self.refractionMap2)
|
util.drawCanvasToCanvas(self.render_buffer, self.refractionMap2)
|
||||||
|
Loading…
Reference in New Issue
Block a user