12-25-2020, 07:31 AM
Hi,
Usual way to iterate lists is not with an index, but with a foreach clause and/or getfirst()/getnext() accessors. Index-based access is used in fixed length vectors.
https://www.csharp-examples.net/foreach/
In Tilengine there are no separate getfirst and getnext functions, just one function. The info parameter to hold returned data is used as a switch:
Usual way to iterate lists is not with an index, but with a foreach clause and/or getfirst()/getnext() accessors. Index-based access is used in fixed length vectors.
https://www.csharp-examples.net/foreach/
In Tilengine there are no separate getfirst and getnext functions, just one function. The info parameter to hold returned data is used as a switch:
- if not empty, it returns the first element
- if empty, it returns the next element in succession