The OnObjectTransition
method is called whenever a transition finishes and this transition had an ID assigned to it. So we will need to act on it:
SELECT
operation on the transition ID.Method OnObjectTransition:Int(transId:Int, obj:ftObject) Select transId
tidParticle
constant. If it is, the particle needs to be removed. Call the object's Remove
method to do this:Case g.tidParticle obj.Remove()
tidGameOver
constant. If it is, activate the title layer:Case g.tidGameOver g.layerTitle.SetActive(True)
1.0:
g.txtGameOver.SetVisible(False) g.txtGameOver.SetScale(1.0)
gmMenu
and end the SELECT
statement:g.gameMode = g.gmMenu End Return 0 End
The code in the OnObjectMethod
made sure that we removed the particles once they reached their destination and also switched the game back to the title screen once the Game Over text was scaled to its final size.
So what is left? Not much. Collision checks should come to mind, as the goal is to destroy the tiles.
3.144.104.29