To modify the UpdateGame
method, we will follow the ensuing steps:
UpdateGame
method in the mainClass.monkey
file.Method UpdateGame:Int()
100
and the current active bombs are not more than the level number.If Rnd(0,100) > 99 And (GetBombsCount() < levelNumber) Then
CreateBomb() Endif UpdateLaunchers() UpdateBombs() UpdateRockets() UpdateExplosions()
gmGameOver
.If GetCityCount() = 0 Then RemoveRockets() RemoveBombs() RemoveExplosions() gameMode = gmGameOver Endif
levelNumber
times 10
with the total number of destroyed bombs.If totalBombsDestroyed >= (levelNumber * 10) Then
3000
points for each city left, and add 5
new rockets to each launcher. Also, raise the level number.score += GetCityCount() * 3000 AddLauncherRockets(5) levelNumber += 1 Endif Return True
mainClass.monkey
file.