Differences

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


wmelite:scripting 2011/04/26 19:38 wmelite:scripting 2011/07/30 15:14 current
Line 2: Line 2:
===== Game object ===== ===== Game object =====
 +
 +==== Game.Platform ====
 +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.
 +
 +==== 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 ====
 +When set to **true**, this property hides the mouse pointer completely. This can useful for touch-only devices where mouse pointer doesn't make much sense.
==== Game.AutoSaveOnExit ==== ==== Game.AutoSaveOnExit ====
-iOS only. This property specifies whether the game should automatically save when the user presses the Home button.+iOS only. This property specifies whether the game should automatically save when the user presses the Home button. Default value is **true**.
==== Game.AutoSaveSlot ==== ==== Game.AutoSaveSlot ====
-iOS only. This property specifies the save game slot used for automatic save. Note that you are responsible for providing the user interface for resuming the game from autosave.+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. 
 + 
 + 
 +==== 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() ==== 
 +iOS only. Displays the top status line on iPhone/iPad. 
 + 
 +==== Game.HideStatusLine() ==== 
 +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.1303839531.txt.gz · Last modified: 2011/04/26 19:38 by Mnemonic
Recent changes RSS feed Creative Commons License Driven by DokuWiki