It is working except for the properties :
If I put that :
local layer = map:getTileLayer ( "StaticItems" ) ;
local list = layer:getTilesWithProperty ( "Type" ) ;
if list == nil then
print ( "Number of items = 0" ) ;
else
print ( "Number of items = "..#list ) ;
end
-- Create the visual
local visual = Lime.createVisual ( map ) ;
The result will be 0.
If I put that :
-- Create the visual
local visual = Lime.createVisual ( map ) ;
--
local layer = map:getTileLayer ( "StaticItems" ) ;
local list = layer:getTilesWithProperty ( "Type" ) ;
if list == nil then
print ( "Number of items = 0" ) ;
else
print ( "Number of items = "..#list ) ;
end
The result will be 3.
[import]uid: 9097 topic_id: 10074 reply_id: 36921[/import]