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:
1. First, perform a
SELECT
operation on the transition ID.Method OnObjectTransition:Int(transId:Int, obj:ftObject) Select transId
2. Check against the
tidParticle
constant. If it is, the particle needs to be removed. Call the object'sRemove
method to do this:Case g.tidParticle obj.Remove()
3. Check against the
tidGameOver
constant. If it is, activate the title layer:Case g.tidGameOver g.layerTitle.SetActive(True)
4. Make the Game Over text invisible and scale it back to
1.0:
g.txtGameOver.SetVisible(False) g.txtGameOver.SetScale(1.0)
5. Set the game mode to
gmMenu
and end theSELECT
statement:g.gameMode = g.gmMenu End Return 0 End