Jump to content

App.lua change


Rick
 Share

Recommended Posts

I would propose a small change to App.lua to better quit the application:

 

1) In App:Start() add: self.quit = false

 

2) Add function:

 

function App:ExitGame()

self.quit = true

end

 

 

3) Last line in App:Loop(): return not self.quit

 

 

If the only way to exit the game is to return false from App:Loop() and today it has "return true" (hardcoded true) then we're forced to code a way to do this. The above example seems like it's a logical thing to do since in any script we can then call App:ExitGame() to quit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...