We have have three game modes. Two of them, gmMenu
and gmGameOver
, are modes where some kind of menu or text is displayed. The third mode, gmPlay
, is for rendering and updating the actual game play.
Select
statement to the OnUpdate
method.Method OnUpdate:Int() Select gameMode
gameMode
is gmMenu
or gmOver
, we will call a new method UpdateMenu
.Case gmMenu, gmGameOver UpdateMenu()
gameMode
is equal to gmPlay
, call another new method called UpdateGame
.Case gmPlay UpdateGame()
Select
statement.End End
UpdateMenu
and UpdateGame
. Inside UpdateMenu
, we will also add an IF statement to act differently, depending on the game mode.Method UpdateMenu:Int() If gameMode = gmMenu 'we will add code here later Else 'Code that runs when gameMode = gmGameOver Endif Return True End Method UpdateGame:Int() Return True End
18.220.184.6