User Tools

Site Tools


script:module:app

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

script:module:app [2015-11-14 23:35] (current)
Line 1: Line 1:
 +Module that wraps the native App class. Derived classes like ClientApp may also augment the module with their variables and functions.
 +
 +
 +====== Functions ======
 +
 +
 +{{Identifier|gamePlugin}} ( )
 +
 +Returns the identifier of the currently loaded game plugin. The return value is text, for instance for [[libdoom]]:​
 +  "​doom"​
 +
 +
 +====== Variables ======
 +
 +
 +{{Identifier|audienceForGameChange}}
 +
 +An array of functions that will be called whenever the game changes. Note that this is also called when the game is unloaded. The identity key of the loaded game mode is provided as an argument to the functions.
 +
 +
 + def gameHasChanged(newGame)
 +     print "Game is now:", newGame
 + end
 + ​App.audienceForGameChange += [gameHasChanged]
 +
 +
 +
  
script/module/app.txt ยท Last modified: 2015-11-14 23:35 (external edit)