now analyzes sprite on load for occupied cells and serializs eetc hehe
This commit is contained in:
parent
d690863b6f
commit
7c7f76b188
1 changed files with 9 additions and 5 deletions
|
|
@ -1,10 +1,7 @@
|
||||||
require "libs/TSerial"
|
require "libs/TSerial"
|
||||||
|
|
||||||
local targetFolder = "art"
|
local targetFolder = "art"
|
||||||
|
local reanalyzeCells = true
|
||||||
function get(folder)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
function getAllAssets()
|
function getAllAssets()
|
||||||
local objectnames = {}
|
local objectnames = {}
|
||||||
|
|
@ -34,7 +31,14 @@ function getAllAssets()
|
||||||
globalAssetProperties[name].class = "unmoveable"
|
globalAssetProperties[name].class = "unmoveable"
|
||||||
globalAssetProperties[name].preload = false
|
globalAssetProperties[name].preload = false
|
||||||
end
|
end
|
||||||
globalAssetProperties[name].sprites[color] = topFolder .. "/" .. folder .. "/" .. fileToAnalyze
|
|
||||||
|
local sprite = topFolder .. "/" .. folder .. "/" .. fileToAnalyze
|
||||||
|
globalAssetProperties[name].sprites[color] = sprite
|
||||||
|
|
||||||
|
if not globalAssetProperties[name].cells or reanalyzeCells then
|
||||||
|
globalAssetProperties[name].cells = {}
|
||||||
|
globalAssetProperties[name].cells[color] = getCellsFromSprite(love.graphics.newImage(sprite))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue