Code: Select all
draw_all_bottom_layers
draw_sprites
draw_all_top_layers
Code: Select all
draw_all_bottom_layers
draw_sprites
draw_all_top_layers
Well, I tried this. I modified STI first:Karai17 wrote:https://github.com/karai17/Simple-Tiled ... t.lua#L449
You can access all individual tile instances through here.
Code: Select all
table.insert(self.tileInstances[tile.gid], {
layer = layer,
batch = batch,
id = id,
gid = tile.gid,
x = tileX,
y = tileY,
r = tile.r,
oy = 0,
quad = tile.quad, -- I add this
tileset = self.tilesets[tile.tileset].image, -- and this
Code: Select all
for i,v in pairs(map.tileInstances) do
for k, j in ipairs(v) do
if j.layer.name == "bot2" then
love.graphics.draw(j.tileset, j.quad, j.x, j.y, j.r)
end
end
end
Code: Select all
table.insert(layer.tiles, {
tileset = self.tilesets[tile.tileset].image,
gid = tile.gid,
x = tileX,
y = tileY,
z = tileY,
r = tile.r,
oy = 0,
quad = tile.quad,
kind = "tile",
})
Code: Select all
function sceneMap:drawMidLayer(map)
-- merging and sorting
local tileLayer = nil
local drawingTable = nil
for i,v in ipairs(map.layers) do
if v.name == "mid" then
tileLayer = table.copy(v.tiles)
end
end
if tileLayer ~= nil then
drawingTable = table.merge(tileLayer,self.events)
else
drawingTable = self.events
end
table.sort(drawingTable,sortZ)
for i,v in ipairs(drawingTable) do
if v.kind == "tile" then
love.graphics.setColor(255, 255, 255, 255)
love.graphics.draw(v.tileset, v.quad, v.x, v.y, v.r)
else
v:draw()
end
end
end
Code: Select all
if signature = true then
print(signaturetext)
else
print("Error: Signature Not Found")
end
I'll look at them, is there an example using any of these for easy set up?Karai17 wrote:You can look up tutorials on Box2D/love.physics or bump.lua. That is what STI uses.
Code: Select all
if signature = true then
print(signaturetext)
else
print("Error: Signature Not Found")
end
Users browsing this forum: No registered users and 2 guests