2019-02-03 20:10:35 +01:00
|
|
|
local folder = "scenes.subgame.sonicboost.actors"
|
|
|
|
|
|
|
|
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()
|
|
|
|
utils.draw.resetColor( )
|
|
|
|
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()
|
|
|
|
utils.draw.resetColor( )
|
|
|
|
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
|