TileList

Contains a list of tiles.

Internally, this contains only pointers to tiles.  So if you copy the list, no tiles are copied, only the pointers.

Summary

Member Functions

GetNext

Tile GetNext()

Allows you to run through the list and look at each tile in it.

When no more tiles are available, nil is returned and ResetNext is automatically called internally.

Usage

local tile;

while true do
tile = tileList:GetNext();
if (tile == nil) then break; end;
LogMsg("Found tile type " .. tile:GetType());
end

Returns

The next Tile in the list, or nil if the end has been reached.

ResetNext

nil ResetNext()

Causes the next call to GetNext to start on the first tile.

GetCount

class_< vector<unsigned int> >(
   "LayerList"
) .def(constructor<>()) .def("Add", &vector<unsigned int>::push_back) .def("GetCount", &vector<unsigned int>::size) .def("Get", &NumberGet) .def("__tostring", &LayerListToString) ]
number GetCount()

Returns

The number of tiles currently in the list.

class_< vector<unsigned int> >(
   "LayerList"
) .def(constructor<>()) .def("Add", &vector<unsigned int>::push_back) .def("GetCount", &vector<unsigned int>::size) .def("Get", &NumberGet) .def("__tostring", &LayerListToString) ]
Anything placeable on the map is housed in a Tile.