Differences

This shows you the differences between the selected revision and the current
version of the page.


wmelite:scripting 2011/05/22 17:17 wmelite:scripting 2011/07/30 15:14 current
Line 6: Line 6:
Read-only. This property returns the name of the operating system WME Lite is currently running on. Possible values at the moment are: **"Windows"**, **"Mac OS X"** and **"iPhone OS"**. Read-only. This property returns the name of the operating system WME Lite is currently running on. Possible values at the moment are: **"Windows"**, **"Mac OS X"** and **"iPhone OS"**.
Note: Regular WME will return **null** when querying this property. That way your scripts can distinguish between WME Regular and WME Lite. Note: Regular WME will return **null** when querying this property. That way your scripts can distinguish between WME Regular and WME Lite.
 +
 +==== Game.DeviceType ====
 +Read-only. This property returns the type of the device WME Lite is currently running on. Possible values at the moment are: **"computer"**, **"phone"** (returned on iPhone/iPod Touch) and **"tablet"** (returned on iPad). You can use this property to modify the user interface of your game (tiny phone screens vs larger tablets). Remember that the actual resolution is not a good indicator of screen size, because phones can use higher density displays (e.g. the retina display used in iPhone 4 / iPod Touch 4).
==== Game.CursorHidden ==== ==== Game.CursorHidden ====
Line 16: Line 19:
iOS only. This property specifies the save game slot used for automatic save. Default value is **999**. iOS only. This property specifies the save game slot used for automatic save. Default value is **999**.
Note that you are responsible for providing the user interface for resuming the game from autosave. Note that you are responsible for providing the user interface for resuming the game from autosave.
 +
 +
 +==== Game.MostRecentSaveSlot ====
 +Read-only. This property returns the number of the most recently used save game slot. If there's no recent slot, this property contains **-1**.
 +It can be used for implementing a "Continue" button in main menu, which will allow the player to quickly continue from their last saved position.
==== Game.ShowStatusLine() ==== ==== Game.ShowStatusLine() ====
Line 22: Line 30:
==== Game.HideStatusLine() ==== ==== Game.HideStatusLine() ====
iOS only. Hides the top status line on iPhone/iPad. iOS only. Hides the top status line on iPhone/iPad.
 +
 +==== Game.Store ====
 +iOS only. Read-only. Returns a reference to the [[store|Store]] object, which can be used for in-app purchases.
 +
 +===== Store object =====
 +
 +[[store|Store object documentation]]
 +
 +====== Changed scripting methods in WME Lite ======
 +
 +==== Game.SaveGame(slot, description, quickSave) ====
 +The SaveGame() method now provides an optional third parameter, which designates a quick save. When quick-saving WME doesn't display the progress indicator.
 +
 
wmelite/scripting.1306077458.txt.gz · Last modified: 2011/05/22 17:17 by Mnemonic
Recent changes RSS feed Creative Commons License Driven by DokuWiki