The OnObjectTimer
method of the engine
class needs to be detailed. For the bullets, the canShoot
field of the game
class needs to be set to TRUE
and they also need to be deleted.
1. Check whether the timer ID is equal to
g.tmDelete
. If yes, call theRemove
method of the object.Method OnObjectTimer:Int(timerId:Int, obj:ftObject) If timerId = g.tmDelete Then obj.Remove()
2. Check whether the timer ID is equal to
g.canShoot
. If yes, setg.canShoot
toTrue
.If timerId = g.tmCanShoot Then g.canShoot = True Return 0 End
Enhancing the OnObjectTimer
method will let you delete objects and set the canShoot
field of the game
class to True
, so the enemy plane can spawn bullets again.