Drag[en]gine Script Module DragonScript  1.23
Dragengine.Engine Class Reference

Drag[en]gine game engine. More...

Inheritance diagram for Dragengine.Engine:

Static Public Member Functions

Management
static float getElapsedTime ()
 Elapsed time since last update. More...
 
static void resetTimers ()
 Resets elapsed time timer. More...
 
static Game getGame ()
 Game object. More...
 
static int getFPSRate ()
 Averaged FPS rate. More...
 
static void quit ()
 Request game to quit. More...
 
static void restart (String info)
 Request game to restart. More...
 
static bool getEditMode ()
 Game is run in edit mode. More...
 
static int loadingResourceCount ()
 Number of loading resources. More...
 
static void log (String message)
 Log message using engine logger. More...
 
static Dictionary getScriptModuleStats ()
 Script module states as Dictionary. More...
 
static bool getAppActive ()
 Application is active (has focus). More...
 
static void updateResourceLoading ()
 Updates resource loading. More...
 
static bool getDefaultEnableGI ()
 Default value for EnableGI parameter in cameras. More...
 
static void setDefaultEnableGI (bool enable)
 Set default value for EnableGI parameter in cameras. More...
 
static bool getDefaultEnableAuralization ()
 Default value for EnableAuralization parameter in microphones. More...
 
static void setDefaultEnableAuralization (bool enable)
 Set default value for EnableAuralization parameter in microphones. More...
 
static String getCompatibleVersion ()
 Compatible script version as set in project files. More...
 
static int getCompatibleVersionMajor ()
 Compatible script version as set in project files. More...
 
static int getCompatibleVersionMinor ()
 Compatible script version as set in project files. More...
 
static int getCompatibleVersionPatch ()
 Compatible script version as set in project files. More...
 
static bool isCompatibleVersionOlder (int major, int minor)
 Compatible script version is older than given version. More...
 
static bool isCompatibleVersionNewer (int major, int minor)
 Compatible script version is newer than given version. More...
 
static String getModuleVersion ()
 Module version. More...
 
static int getModuleVersionMajor ()
 Module version. More...
 
static int getModuleVersionMinor ()
 Module version. More...
 
static int getModuleVersionPatch ()
 Module version. More...
 
static bool isModuleVersionOlder (int major, int minor)
 Module script version is older than given version. More...
 
static bool isModuleVersionNewer (int major, int minor)
 Module script version is newer than given version. More...
 
static String getUserLocaleLanguage ()
 Get current user locale language. More...
 
static String getUserLocaleTerritory ()
 Get current user locale territory. More...
 
static Set getSupportedServices ()
 Get all supported service names. More...
 

Detailed Description

Drag[en]gine game engine.

This is a native class. This is a pure static class. The class can not be instantiated

Member Function Documentation

◆ getAppActive()

static bool Dragengine.Engine.getAppActive ( )
static

Application is active (has focus).

Version
1.22

◆ getCompatibleVersion()

static String Dragengine.Engine.getCompatibleVersion ( )
static

Compatible script version as set in project files.

Version
1.9

◆ getCompatibleVersionMajor()

static int Dragengine.Engine.getCompatibleVersionMajor ( )
static

Compatible script version as set in project files.

Version
1.9

◆ getCompatibleVersionMinor()

static int Dragengine.Engine.getCompatibleVersionMinor ( )
static

Compatible script version as set in project files.

Version
1.9

◆ getCompatibleVersionPatch()

static int Dragengine.Engine.getCompatibleVersionPatch ( )
static

Compatible script version as set in project files.

Version
1.9

◆ getDefaultEnableAuralization()

static bool Dragengine.Engine.getDefaultEnableAuralization ( )
static

Default value for EnableAuralization parameter in microphones.

Version
1.23

◆ getDefaultEnableGI()

static bool Dragengine.Engine.getDefaultEnableGI ( )
static

Default value for EnableGI parameter in cameras.

Version
1.5

◆ getEditMode()

static bool Dragengine.Engine.getEditMode ( )
static

Game is run in edit mode.

This can be used by editor applications to allow in-editor game previews if supported.

◆ getElapsedTime()

static float Dragengine.Engine.getElapsedTime ( )
static

Elapsed time since last update.

◆ getFPSRate()

static int Dragengine.Engine.getFPSRate ( )
static

Averaged FPS rate.

◆ getGame()

static Game Dragengine.Engine.getGame ( )
static

Game object.

◆ getModuleVersion()

static String Dragengine.Engine.getModuleVersion ( )
static

Module version.

Version
1.9

◆ getModuleVersionMajor()

static int Dragengine.Engine.getModuleVersionMajor ( )
static

Module version.

Version
1.9

◆ getModuleVersionMinor()

static int Dragengine.Engine.getModuleVersionMinor ( )
static

Module version.

Version
1.9

◆ getModuleVersionPatch()

static int Dragengine.Engine.getModuleVersionPatch ( )
static

Module version.

Version
1.9

◆ getScriptModuleStats()

static Dictionary Dragengine.Engine.getScriptModuleStats ( )
static

Script module states as Dictionary.

◆ getSupportedServices()

static Set Dragengine.Engine.getSupportedServices ( )
static

Get all supported service names.

Version
1.23

Returns Set of String instances.

◆ getUserLocaleLanguage()

static String Dragengine.Engine.getUserLocaleLanguage ( )
static

Get current user locale language.

Version
1.16

Returns language as ISO 639 language code in lower case. If the locale can not be determined "en" is returned.

◆ getUserLocaleTerritory()

static String Dragengine.Engine.getUserLocaleTerritory ( )
static

Get current user locale territory.

Version
1.16

Returns language as ISO 3166 country code in lower case. If the locale can not be determined or the locale does not contain a country code empty string is returned.

◆ isCompatibleVersionNewer()

static bool Dragengine.Engine.isCompatibleVersionNewer ( int  major,
int  minor 
)
static

Compatible script version is newer than given version.

Version
1.10

◆ isCompatibleVersionOlder()

static bool Dragengine.Engine.isCompatibleVersionOlder ( int  major,
int  minor 
)
static

Compatible script version is older than given version.

Version
1.10

◆ isModuleVersionNewer()

static bool Dragengine.Engine.isModuleVersionNewer ( int  major,
int  minor 
)
static

Module script version is newer than given version.

Version
1.10

◆ isModuleVersionOlder()

static bool Dragengine.Engine.isModuleVersionOlder ( int  major,
int  minor 
)
static

Module script version is older than given version.

Version
1.10

◆ loadingResourceCount()

static int Dragengine.Engine.loadingResourceCount ( )
static

Number of loading resources.

◆ log()

static void Dragengine.Engine.log ( String  message)
static

Log message using engine logger.

◆ quit()

static void Dragengine.Engine.quit ( )
static

Request game to quit.

Before the next frame update cleans up the game object and shuts down the game engine. This call returns.

◆ resetTimers()

static void Dragengine.Engine.resetTimers ( )
static

Resets elapsed time timer.

Calling this before entering the game for the first time avoids a single time large update value which can result in strange effects.

◆ restart()

static void Dragengine.Engine.restart ( String  info)
static

Request game to restart.

Version
1.23
Parameters
infoInformation to retrieve using Game.getRestartInfo() after restart.

Before the next frame update cleans up the game object then recreates the game object. In the restarted game 'info' can be retrieved using Game.getRestartInfo() to restore game state if possible. This call returns.

Restarting can be used for example if game modifications are enabled changing scripts files. In contrary to a full game restart this restart is faster and allows to restore the state (typically UI) before the restart using 'info'ยท

◆ setDefaultEnableAuralization()

static void Dragengine.Engine.setDefaultEnableAuralization ( bool  enable)
static

Set default value for EnableAuralization parameter in microphones.

Version
1.23

◆ setDefaultEnableGI()

static void Dragengine.Engine.setDefaultEnableGI ( bool  enable)
static

Set default value for EnableGI parameter in cameras.

Version
1.5

◆ updateResourceLoading()

static void Dragengine.Engine.updateResourceLoading ( )
static

Updates resource loading.

Version
1.22

Use this method if resources are loaded asynchronously but the script requires to wait synchronously for the completion.

Warning
This method is potentially dangerous. Use it only if you know what you are doing.

The documentation for this class was generated from the following file: