Is there an equal to named blocks in Haxe (as there was in Action Script 3)? I don't know if 'named block' is the correct term.
Given the following example (a basic example to highlight a point):
singleCollision: {
for (teleport in teleports) {
if ( overlap(player, teleport ) ) {
onTeleport(player, teleport);
break singleCollision;
}
}
for (chest in chests) {
if ( overlap(player, chest ) ) {
onChest(player, chest);
break singleCollision;
}
}
for (shop in shops) {
if ( overlap(player, shop ) ) {
onShop(player, shop);
break singleCollision;
}
}
}
If a collision occurs, break the block and continue. I know there are alternatives such as inline functions, etc, but more curious to know if Haxe supports something similar.
A good example is found here: http://jacksondunstan.com/articles/1228