Gio,
I saw this in the 3.3 change log - " Added an onOverlap event to SceneObjects "
Let's say I have a scenario where arrows are fired at enemies and I want to figure out if the arrows have hit an enemy. Both arrows and enemies are scene objects.
Currently, I keep an array of arrows, loop through them and for each arrow, call its' getOverlappingObjects() function. Then if there are overlapping objects, I check to see if it has an "isEnemy" attribute.If that is true, then do whatever is supposed to happen when an enemy gets hit by an arrow.
Should I now instead implement and onOverlap() handler in the enemy scene object, check if the overlapping object has an "isArrow" attribute.and then do whatever is supposed to happen when an enemy gets hit by an arrow.
Any guidance you can provide will be appreciated.
cheers - shri