Is there a way to end the game when something that is not the character is destroyed? For example, assume my character is invincible and is defending something. When the object that is being defended is destroyed, I would want the game to end. Any ideas?
In the death animation of your object, you would need to place in another object and set it to destroy character, and make i big enough to cover the screen to ensure it will hit your character.
This is the conclusion I eventually reached with one caveat; if you want the object that is destroyed to NOT be deadly to the character, you'll need to use a spawner inside of the death animation instead of simply an enemy.
Or in your Object death animation add a reward action point, big enough to cover the screen and in your GamePlay UI add Event Observer to redirect when is collect one point, in that way you can add a redirect to next level directly and have a Game Over Ui also