|
Drag[en]gine Script Module DragonScript 1.35
|
Base class managing basic game services. More...
Public Member Functions | |
| void | addInitializeService () |
| Increment initialize service count by 1. | |
| void | addModsService (ServiceMods service) |
| Add modification service. | |
| void | addStatsService (ServiceStats service) |
| Add stats service. | |
| void | addUserService (ServiceUser service) |
| Add user service. | |
| void | autoInitMsgdk () |
| Automatically initialize Microsoft GDK if supported. | |
| void | autoInitServices () |
| Automatically initialize supported services. | |
| void | autoInitSteam () |
| Automatically initialize steam if supported. | |
| void | closeEos () |
| Close and dispose Eos service. | |
| void | closeModio () |
| Close and dispose Mod.io service. | |
| void | closeMsgdk () |
| Close and dispose Microsoft GDK service. | |
| void | closeSteam () |
| Close and dispose Steam service. | |
| Array | collectModsService (Block ablock) |
| Collect modification services using block. | |
| Array | collectStatsService (Block ablock) |
| Collect stats services using block. | |
| Array | collectUserService (Block ablock) |
| Collect user services using block. | |
| void | dispose () |
| Dispose of base game services. | |
| ServiceMods | findModsService (Block ablock) |
| Find modification services with block. | |
| ServiceStats | findStatsService (Block ablock) |
| Find stats services with block. | |
| ServiceUser | findUserService (Block ablock) |
| Find user services with block. | |
| void | forEachModsService (Block ablock) |
| Visit modification services with block. | |
| void | forEachStatsService (Block ablock) |
| Visit stats services with block. | |
| void | forEachUserService (Block ablock) |
| Visit user services with block. | |
| Array | getAllModsServices () |
| All modification services as Array of ServiceMods. | |
| Array | getAllStatsServices () |
| All stats services as Array of ServiceStats. | |
| Array | getAllUserServices () |
| All user services as Array of ServiceUser. | |
| ServiceEos | getEos () |
| int | getInitializeServiceCount () |
| Count of services in progress of being initialized. | |
| ServiceModio | getModio () |
| int | getModsServiceCount () |
| Count of initialized modification services. | |
| ServiceMsgdk | getMsgdk () |
| Microsoft GDK service or null. | |
| ServiceSteam | getSteam () |
| Steam service or null. | |
| Array | getSupportedAuthProviders (Set ids) |
| Find ServiceUser supported by another service for authentification. | |
| int | getUserServiceCount () |
| Count of initialized user services. | |
| void | initEos (ServiceEos.InitParameters params, ServiceInitListener listener) |
| Initialize EOS service. | |
| void | initEos (ServiceInitListener listener) |
| Initialize EOS service using parameters from configuration parameter tree. | |
| void | initModio (ServiceInitListener listener) |
| Initialize Mod.io service using parameters from configuration parameter tree. | |
| void | initModio (ServiceModio.InitParameters params, ServiceInitListener listener) |
| Initialize Mod.io service. | |
| void | initMsgdk () |
| Initialize Microsoft GDK service using parameters from configuration parameter tree. | |
| void | initMsgdk (ServiceMsgdk.InitParameters params) |
| Initialize Microsoft GDK service. | |
| void | initSteam () |
| Initialize Steam service using parameters from configuration parameter tree. | |
| void | initSteam (ServiceSteam.InitParameters params) |
| Initialize Steam service. | |
| BaseGameServices | new () |
| Create base game services instance using BaseGameApp.getApp(). | |
| BaseGameServices | new (ParameterTree configuration, Console console) |
| Create base game services instance. | |
| void | removeInitializeService () |
| Decrement initialize service count by 1. | |
| void | removeModsService (ServiceMods service) |
| Remove modification service if present. | |
| void | removeStatsService (ServiceStats service) |
| Remove stats service if present. | |
| void | removeUserService (ServiceUser service) |
| Remove user service if present. | |
| void | setActionInitialized (ActionListener listener) |
| Set action to be called if all services finished initialization. | |
Public Attributes | |
| ActionListener | pActionInitialized |
| ParameterTree | pConfiguration |
| Console | pConsole |
| ServiceEos | pEos |
| int | pInitializeCount |
| ServiceModio | pModio |
| ServiceMsgdk | pMsgdk |
| ServiceSteam | pSteam |
| Array | pUser |
Base class managing basic game services.
Stores list of basic game services. User can request instances of supported services to be created. The user can either request them individually or all automatically. Supports services of implementing these interfaces:
See the documentation of the respective service create function for the parameters required to successfully start the service. The information is stored in the game configuration parameter tree. Supports being used by BaseGameApp and other base classes as long as the required object instances can be provided on construction time.
The user can set an action listener using setActionInitialized() to be notified once all services have finished initialize. If all services are already initialized the provided action is immediately run.
Make sue to call dispose() upon closing the game to properly clean up all service resources.
| void Dragengine.Services.BaseGameServices.addInitializeService | ( | ) |
Increment initialize service count by 1.
Referenced by initEos().
| void Dragengine.Services.BaseGameServices.addModsService | ( | ServiceMods | service | ) |
Add modification service.
Referenced by initSteam().
| void Dragengine.Services.BaseGameServices.addStatsService | ( | ServiceStats | service | ) |
Add stats service.
Referenced by findModsService().
| void Dragengine.Services.BaseGameServices.addUserService | ( | ServiceUser | service | ) |
Add user service.
Referenced by findUserService().
| void Dragengine.Services.BaseGameServices.autoInitMsgdk | ( | ) |
Automatically initialize Microsoft GDK if supported.
Initializes Microsoft GDK if all of the following conditions are fulfilled:
Failure to initialize is only logged and does not throw an exception.
References pConsole, and pSteam.
Referenced by setActionInitialized().
| void Dragengine.Services.BaseGameServices.autoInitServices | ( | ) |
Automatically initialize supported services.
Uses presence of configuration options and command line parameters to initialize all supported services.
Some service are asynchronously initialized and will be only available in the type specific lists once successfully initialized. Use getInitializeServiceCount() to know if there are still service initializing. Once all services finished initializing it is safe to examine which services are actually usable.
Failure to initialize services is only logged and does not throw exceptions.
The following services are supported:
Requires configuration parameters:
The user can set an action listener using setActionInitialized() to be notified once all services have finished initialize. If all services are already initialized the provided action is immediately run.
References initEos(), and pConfiguration.
Referenced by setActionInitialized().
| void Dragengine.Services.BaseGameServices.autoInitSteam | ( | ) |
Automatically initialize steam if supported.
Initializes Steam if all of the following conditions are fulfilled:
Failure to initialize is only logged and does not throw an exception.
Referenced by getModio(), and setActionInitialized().
| void Dragengine.Services.BaseGameServices.closeEos | ( | ) |
Close and dispose Eos service.
Does nothing if service is not initialized.
References pInitializeCount, and removeInitializeService().
Referenced by removeUserService(), and setActionInitialized().
| void Dragengine.Services.BaseGameServices.closeModio | ( | ) |
Close and dispose Mod.io service.
Does nothing if service is not initialized.
References getEos(), initEos(), pConfiguration, and pEos.
Referenced by removeUserService(), and setActionInitialized().
| void Dragengine.Services.BaseGameServices.closeMsgdk | ( | ) |
Close and dispose Microsoft GDK service.
Does nothing if service is not initialized.
References pConsole, pSteam, and pUser.
Referenced by removeUserService(), and setActionInitialized().
| void Dragengine.Services.BaseGameServices.closeSteam | ( | ) |
Close and dispose Steam service.
Does nothing if service is not initialized.
References removeModsService().
Referenced by getModio(), initModio(), and removeUserService().
| Array Dragengine.Services.BaseGameServices.collectModsService | ( | Block | ablock | ) |
Collect modification services using block.
Block receives as parameter ServiceMods and has to return true to include the service in the returned list or false to not include.
Referenced by initEos().
| Array Dragengine.Services.BaseGameServices.collectStatsService | ( | Block | ablock | ) |
Collect stats services using block.
Block receives as parameter ServiceStats and has to return true to include the service in the returned list or false to not include.
Referenced by initSteam().
| Array Dragengine.Services.BaseGameServices.collectUserService | ( | Block | ablock | ) |
Collect user services using block.
Block receives as parameter ServiceUser and has to return true to include the service in the returned list or false to not include.
References pUser.
Referenced by findStatsService().
| void Dragengine.Services.BaseGameServices.dispose | ( | ) |
Dispose of base game services.
References pConfiguration, pConsole, and pUser.
Referenced by removeUserService().
| ServiceMods Dragengine.Services.BaseGameServices.findModsService | ( | Block | ablock | ) |
Find modification services with block.
Block receives as parameter ServiceMods and has to return true if found or false otherwise.
References addStatsService().
Referenced by getEos().
| ServiceStats Dragengine.Services.BaseGameServices.findStatsService | ( | Block | ablock | ) |
Find stats services with block.
Block receives as parameter ServiceStats and has to return true if found or false otherwise.
References collectUserService(), and pUser.
Referenced by getSteam().
| ServiceUser Dragengine.Services.BaseGameServices.findUserService | ( | Block | ablock | ) |
Find user services with block.
Block receives as parameter ServiceUser and has to return true if found or false otherwise.
References addUserService(), getUserServiceCount(), and pUser.
Referenced by forEachStatsService().
| void Dragengine.Services.BaseGameServices.forEachModsService | ( | Block | ablock | ) |
Visit modification services with block.
Block receives as parameter ServiceMods.
Referenced by getEos().
| void Dragengine.Services.BaseGameServices.forEachStatsService | ( | Block | ablock | ) |
Visit stats services with block.
Block receives as parameter ServiceStats.
References findUserService(), and pUser.
Referenced by removeInitializeService().
| void Dragengine.Services.BaseGameServices.forEachUserService | ( | Block | ablock | ) |
Visit user services with block.
Block receives as parameter ServiceUser.
References pActionInitialized, and pUser.
Referenced by removeStatsService().
| Array Dragengine.Services.BaseGameServices.getAllModsServices | ( | ) |
All modification services as Array of ServiceMods.
References removeStatsService().
Referenced by initEos().
| Array Dragengine.Services.BaseGameServices.getAllStatsServices | ( | ) |
All stats services as Array of ServiceStats.
References getAllUserServices(), and pUser.
Referenced by initSteam().
| Array Dragengine.Services.BaseGameServices.getAllUserServices | ( | ) |
All user services as Array of ServiceUser.
References pUser, and removeUserService().
Referenced by getAllStatsServices().
| ServiceEos Dragengine.Services.BaseGameServices.getEos | ( | ) |
EOS service or null.
References findModsService(), and forEachModsService().
Referenced by closeModio().
| int Dragengine.Services.BaseGameServices.getInitializeServiceCount | ( | ) |
Count of services in progress of being initialized.
Referenced by initEos().
| ServiceModio Dragengine.Services.BaseGameServices.getModio | ( | ) |
Mod.io service or null.
References autoInitSteam(), closeSteam(), initSteam(), pConfiguration, and pConsole.
Referenced by setActionInitialized().
| int Dragengine.Services.BaseGameServices.getModsServiceCount | ( | ) |
Count of initialized modification services.
Referenced by initSteam().
| ServiceMsgdk Dragengine.Services.BaseGameServices.getMsgdk | ( | ) |
Microsoft GDK service or null.
References getSteam(), and pSteam.
Referenced by setActionInitialized().
| ServiceSteam Dragengine.Services.BaseGameServices.getSteam | ( | ) |
| Array Dragengine.Services.BaseGameServices.getSupportedAuthProviders | ( | Set | ids | ) |
Find ServiceUser supported by another service for authentification.
Returns Array of ServiceUser.
| ids | Set of String authentication provider identifiers. Get this set from feature instances obtained from the respective service. |
Referenced by removeModsService().
| int Dragengine.Services.BaseGameServices.getUserServiceCount | ( | ) |
Count of initialized user services.
Referenced by findUserService().
| void Dragengine.Services.BaseGameServices.initEos | ( | ServiceEos.InitParameters | params, |
| ServiceInitListener | listener ) |
Initialize EOS service.
Once initialized successfully the service will be added to following type specific service lists:
| params | Initialization parameters. |
| listener | Listener to call if initialization finished or null. |
| EInvalidParam | One or more parameter is invalid. |
| EInvalidAction | EOS is already initialized. |
References addInitializeService(), and pInitializeCount.
| void Dragengine.Services.BaseGameServices.initEos | ( | ServiceInitListener | listener | ) |
Initialize EOS service using parameters from configuration parameter tree.
Requires these configuration parameters to be present:
Optional configuration paramenets:
Once initialized successfully the service will be added to following type specific service lists:
| listener | Listener to call if initialization finished or null. |
| EInvalidParam | One or more required configuration parameter is missing. |
| EInvalidAction | EOS is already initialized. |
References collectModsService(), getAllModsServices(), getInitializeServiceCount(), and pInitializeCount.
Referenced by autoInitServices(), closeModio(), and setActionInitialized().
| void Dragengine.Services.BaseGameServices.initModio | ( | ServiceInitListener | listener | ) |
Initialize Mod.io service using parameters from configuration parameter tree.
Requires these configuration parameters to be present:
Optional configuration parameters:
Portal is chosen depending on the initialized user services.
Once initialized successfully the service will be added to following type specific service lists:
| listener | Listener to call if initialization finished or null. |
| EInvalidParam | One or more required configuration parameter is missing. |
| EInvalidAction | Mod.io is already initialized. |
References closeSteam(), pSteam, and pUser.
Referenced by setActionInitialized().
| void Dragengine.Services.BaseGameServices.initModio | ( | ServiceModio.InitParameters | params, |
| ServiceInitListener | listener ) |
Initialize Mod.io service.
Once initialized successfully the service will be added to following type specific service lists:
| params | Initialization parameters |
| listener | Listener to call if initialization finished or null. |
| EInvalidParam | One or more parameter is invalid. |
| EInvalidAction | Mod.io is already initialized. |
References pSteam.
| void Dragengine.Services.BaseGameServices.initMsgdk | ( | ) |
Initialize Microsoft GDK service using parameters from configuration parameter tree.
Requires these configuration parameters to be present:
Service will be added to the following type specific service lists:
| EInvalidParam | One or more required configuration parameter is missing. |
| EInvalidAction | Microsoft GDK is already initialized. |
References initSteam(), and pConfiguration.
Referenced by setActionInitialized().
| void Dragengine.Services.BaseGameServices.initMsgdk | ( | ServiceMsgdk.InitParameters | params | ) |
Initialize Microsoft GDK service.
Service will be added to the following type specific service lists:
| EInvalidParam | One or more parameter is invalid. |
| EInvalidAction | Microsoft GDK is already initialized. |
References initSteam().
| void Dragengine.Services.BaseGameServices.initSteam | ( | ) |
Initialize Steam service using parameters from configuration parameter tree.
Requires these configuration parameters to be present:
Service will be added to the following type specific service lists:
| EInvalidParam | One or more required configuration parameter is missing. |
| EInvalidAction | Steam is already initialized. |
References collectStatsService(), and getAllStatsServices().
Referenced by getModio(), initMsgdk(), and initMsgdk().
| void Dragengine.Services.BaseGameServices.initSteam | ( | ServiceSteam.InitParameters | params | ) |
Initialize Steam service.
Service will be added to the following type specific service lists:
| EInvalidParam | One or more parameter is invalid. |
| EInvalidAction | Steam is already initialized. |
References addModsService(), and getModsServiceCount().
| BaseGameServices Dragengine.Services.BaseGameServices.new | ( | ) |
Create base game services instance using BaseGameApp.getApp().
References new().
| BaseGameServices Dragengine.Services.BaseGameServices.new | ( | ParameterTree | configuration, |
| Console | console ) |
Create base game services instance.
References new().
| void Dragengine.Services.BaseGameServices.removeInitializeService | ( | ) |
Decrement initialize service count by 1.
References forEachStatsService().
Referenced by closeEos().
| void Dragengine.Services.BaseGameServices.removeModsService | ( | ServiceMods | service | ) |
Remove modification service if present.
References getSupportedAuthProviders(), and pUser.
Referenced by closeSteam().
| void Dragengine.Services.BaseGameServices.removeStatsService | ( | ServiceStats | service | ) |
Remove stats service if present.
References forEachUserService(), and pUser.
Referenced by getAllModsServices().
| void Dragengine.Services.BaseGameServices.removeUserService | ( | ServiceUser | service | ) |
Remove user service if present.
References closeEos(), closeModio(), closeMsgdk(), closeSteam(), and dispose().
Referenced by getAllUserServices().
| void Dragengine.Services.BaseGameServices.setActionInitialized | ( | ActionListener | listener | ) |
Set action to be called if all services finished initialization.
If all services are already initialized the provided action is immediately run. Listener can be null in which case the listener is cleared.
References autoInitMsgdk(), autoInitServices(), autoInitSteam(), closeEos(), closeModio(), closeMsgdk(), getModio(), getMsgdk(), initEos(), initModio(), initMsgdk(), pActionInitialized, pConfiguration, pConsole, pEos, pInitializeCount, pModio, pMsgdk, pSteam, pUser, and setActionInitialized().
Referenced by setActionInitialized().
| ActionListener Dragengine.Services.BaseGameServices.pActionInitialized |
Referenced by forEachUserService(), and setActionInitialized().
| ParameterTree Dragengine.Services.BaseGameServices.pConfiguration |
Referenced by autoInitServices(), closeModio(), dispose(), getModio(), initMsgdk(), and setActionInitialized().
| Console Dragengine.Services.BaseGameServices.pConsole |
Referenced by autoInitMsgdk(), closeMsgdk(), dispose(), getModio(), and setActionInitialized().
| ServiceEos Dragengine.Services.BaseGameServices.pEos |
Referenced by closeModio(), and setActionInitialized().
| int Dragengine.Services.BaseGameServices.pInitializeCount |
Referenced by closeEos(), initEos(), initEos(), and setActionInitialized().
| ServiceModio Dragengine.Services.BaseGameServices.pModio |
Referenced by setActionInitialized().
| ServiceMsgdk Dragengine.Services.BaseGameServices.pMsgdk |
Referenced by setActionInitialized().
| ServiceSteam Dragengine.Services.BaseGameServices.pSteam |
Referenced by autoInitMsgdk(), closeMsgdk(), getMsgdk(), initModio(), initModio(), and setActionInitialized().
| Array Dragengine.Services.BaseGameServices.pUser |