You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 24, 2018. It is now read-only.
Please consider adding this function to Tilemap.hx
/** * Returns all objects with matching name in a given object group * @paramname The name of the object * @paraminObjectGroup The object group which contains this object. * @return An TiledObject, null if there is no such object.*/publicfunctiongetObjectsByName(name:String, inObjectGroup:TiledObjectGroup):Array<TiledObject>
{
vark:Array<TiledObject> =newArray<TiledObject>();
for(objectininObjectGroup) {
if(object.name==name) {
k.push(object);
}
}
returnk;
}
and subsequently changing getObjectByName comment to
/** * Returns first object with matching name in a given object group * @paramname The name of the object * @paraminObjectGroup The object group which contains this object. * @return An TiledObject, null if there is no such object.*/
Reasoning behind is pretty simple - a lot of times i use standardized objects within given map and just copy-paste them. Changing name for every single one of them would be stupid, to say the least.