2019-02-03 20:25:42 +01:00
|
|
|
local folder = "scenes.subgame.sonic-boost.actors."
|
2019-02-03 20:10:35 +01:00
|
|
|
|
|
|
|
local Entity = require(folder .. "parent")
|
2019-02-03 19:54:02 +01:00
|
|
|
local Rail = Entity:extend()
|
|
|
|
|
|
|
|
function Rail:new(world, x, y, z, id)
|
|
|
|
local z = z or 32
|
|
|
|
self.railid = id or 2
|
|
|
|
|
|
|
|
Rail.super.new(self, world, "grind", x, y-4, 24, 31, 8, 8)
|
|
|
|
|
|
|
|
self:setDebugColor(.2, .2, .2)
|
|
|
|
|
|
|
|
self.depth = 1
|
|
|
|
end
|
|
|
|
|
|
|
|
function Rail:draw()
|
2019-02-04 08:50:54 +01:00
|
|
|
utils.graphics.resetColor( )
|
2019-02-03 19:54:02 +01:00
|
|
|
love.graphics.draw(self.world.textures.rail, self.world.quads.rails[self.railid], self.x + math.floor(self.y / 2), self.y - self.z -(self.d / 2))
|
|
|
|
end
|
|
|
|
|
|
|
|
function Rail:drawEcho()
|
2019-02-04 08:50:54 +01:00
|
|
|
utils.graphics.resetColor( )
|
2019-02-03 19:54:02 +01:00
|
|
|
love.graphics.draw(self.world.textures.rail, self.world.quads.rails[self.railid], self.x + math.floor(self.y / 2) + self.world.width, self.y - self.z -(self.d / 2))
|
|
|
|
end
|
|
|
|
|
|
|
|
return Rail
|