fixed map; hookshots circle is now drawn on background
This commit is contained in:
parent
37d44ce0a2
commit
192b1e6ca0
|
@ -22,14 +22,17 @@ function HookAnchor:New(x,y,hookDistance)
|
|||
end
|
||||
|
||||
function HookAnchor:HandleAnimation()
|
||||
self.body:Animate()
|
||||
self:Draw(self.body)
|
||||
end
|
||||
|
||||
function HookAnchor:DrawBackground()
|
||||
love.graphics.circle(
|
||||
"line",
|
||||
-Camera.pos.x + self.pos.x,
|
||||
-Camera.pos.y + self.pos.y,
|
||||
self.hookDistance
|
||||
)
|
||||
self.body:Animate()
|
||||
self:Draw(self.body)
|
||||
end
|
||||
|
||||
function HookAnchor:DoPhysics()
|
||||
|
|
|
@ -248,6 +248,9 @@ function Entity:Debug()
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
function Entity:DrawBackground()
|
||||
end
|
||||
require "code/entities/kupo"
|
||||
require "code/entities/arrow"
|
||||
require "code/entities/decoration"
|
||||
|
|
|
@ -66,14 +66,22 @@ end
|
|||
|
||||
function GameDraw()
|
||||
|
||||
-- prepare
|
||||
GameworldDrawPrepare()
|
||||
|
||||
-- background
|
||||
GameworldDrawBackground()
|
||||
GameworldDrawEntitiesBackground()
|
||||
|
||||
-- foreground
|
||||
GameworldDrawForeground()
|
||||
if LevelData.properties.darkness then
|
||||
GameworldDrawLighting()
|
||||
end
|
||||
GameworldDrawParticles()
|
||||
GameworldDrawEntities()
|
||||
|
||||
-- end
|
||||
GameworldDrawEnd()
|
||||
|
||||
-- hud
|
||||
|
|
|
@ -40,8 +40,14 @@ function GameworldDrawParticles()
|
|||
end
|
||||
end
|
||||
|
||||
function GameworldDrawEntitiesBackground()
|
||||
for _, enty in pairs(LoadedObjects.Entities) do
|
||||
enty:DrawBackground()
|
||||
end
|
||||
end
|
||||
|
||||
function GameworldDrawEntities()
|
||||
love.graphics.setColor(1,1,1)
|
||||
love.graphics.setColor(0.7,0.7,0.7)
|
||||
for _, enty in pairs(LoadedObjects.Entities) do
|
||||
enty:HandleAnimation()
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ return {
|
|||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue