OnUpdateLayer method, we want to update emitters and enemies. Also we want to check whether all tiles were removed and start the next level. If all lives of the player's ball are gone, we want to display the Game Over text. Follow the given steps:
Method OnLayerUpdate:Int(layer:ftLayer) If layer = g.layerGame Then
FOR EACHINloop of the emitter list of the
For Local emitter := Eachin g.emitterList
FALSE. We will use the engine's current delta time as a parameter for the emitter's
Updatecall. If it is, then the emitter is done ...