Hi,
you'll have to wire the logic yourself, here. For example, when the loop if finished you can go to another state that will implement the logic needed ( to fire an event on the last cube).
Unless, I misunderstand and you want to actually watch cubes disappearance only? for this you don't need to iterate throught each cubes, simply maintain a variable representing the number of cubes, and everytime a cube appear or disapear you increment decrement that integer, when this integer it 0, then it means all cubes are invisible, hence the end of your game.
bye,
Jean