Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
Game Class Reference
Inheritance diagram for Game:
ChimeraGame

Protected Member Functions

sealed World GetWorld ()
sealed InputManager GetInputManager ()
sealed MenuManager GetMenuManager ()
sealed WorkspaceWidget GetWorkspace ()
proto external string GetWorldFile ()
 Returns path of world file loaded.
proto external GameWorldEditor GetWorldEditor ()
proto external void StartCinematic (string name)
proto external void StopCinematic ()
proto external bool IsPlayingCinematic ()
proto external UserSettings GetEngineUserSettings ()
 Returns UserSettings container for Engine User Settings.
proto external UserSettings GetGameUserSettings ()
 Returns UserSettings container for Game User Settings.
proto external void ApplySettingsPreset ()
 Apply setting preset according to DisplayUserSettings.OverallQuality.
proto external void UserSettingsChanged ()
 Notify engine about changes in Engine User Settings.
proto external void SaveUserSettings ()
 Save Engine User Settings to permanent storage.
proto external bool IsSaveStorageAvailable ()
 Determines the availability of save storage. Game can try to call PlatformService::ObtainSaveDataAsync() which would reinitilize the storage access if possible.
proto external BackendApi GetBackendApi ()
 Backend Api access class.
proto external BackendDebugApi GetBackendDebugApi ()
proto external RestApi GetRestApi ()
 RESTful Api request access class.
proto external bool BeginPreload (notnull BaseWorld world, vector pos, float radius, int maxTime_sec=60)
 Begin preloading on given position with given radius. Call is non-blocking, to get status of preload use IsPreloadFinished method.
proto external bool IsPreloadFinished ()
 If preload (started with BeginPreload method) is finished, returns true.
proto external int GetLoadTime ()
 Returns load time in milliseconds for the lastly loaded world.
proto external void RequestClose ()
 Setting request flag for engine to exit the game.
proto external string GetBuildVersion ()
 Returns version of the game.
proto external string GetBuildTime ()
 Returns date and time when the game was built.
proto external GenericWorldEntity GetWorldEntity ()
 Returns path of world file loaded.
proto external IEntity FindEntity (string name)
proto external bool InPlayMode ()
proto external int ReloadFailureAddons (out notnull array< string > addons)
proto external PlatformService GetPlatformService ()
proto external ref ScriptModule GetScriptModule ()
proto external void RequestReload (array< string > addonGUIDs=null)
 Setting request flag for the engine to reinitialize the game Doesn't do anything in Workbench.
proto external IEntity SpawnEntity (typename typeName, BaseWorld world=null, EntitySpawnParams params=null)
proto external IEntity SpawnEntityPrefab (notnull Resource templateResource, BaseWorld world=null, EntitySpawnParams params=null)
event GetMenuPreset ()
event LoadingAnim CreateLoadingAnim (WorkspaceWidget workspaceWidget)
event void OnUpdate (BaseWorld world, float timeslice)
 Called on World update.
event void OnAfterInit (BaseWorld world)
 Called after full initialization of Game instance.
event bool OnGameStart ()
 Event which is called right before game starts (all entities are created and initialized). Returns true if the game can start.
event void OnGameEnd ()
 Event which is called right before game end.
event void OnEvent (EventType eventTypeId, Tuple params)
 Called when some system event occur. (NOTE: currently not called because of problems with recursion).
event void OnUserSettingsChangedEvent ()
 Event which is called when user change settings.
event void OnInputDeviceUserChangedEvent (EInputDeviceType oldDevice, EInputDeviceType newDevice)
 Event which is called when input device binded to user changed.
event void OnInputDeviceIsGamepadEvent (bool isGamepad)
 Event which is called when input device binded to user changes between gamepad and keyboard/mouse, ignoring Joystick and TrackIR.
event void OnWorldPostProcess (World world)
 Event called once loading of all entities of the world have been finished. (still within the loading).
event void OnWorldSimulatePhysics (float timeSlice)
 Event which is called before each fixed step of the physics simulation.
event void OnWorldPostSimulatePhysics (float timeSlice)
event void OnWindowResize (int w, int h, bool windowed)
 Event which is called when window size of fullscreen state changed.
event void HostGameConfig ()
 Called after reload to host a modded scenario.
event void PlayGameConfig (ResourceName sResource, string addonsList)
event ref array< ResourceNameGetDefaultGameConfigs ()
event Managed ReadGameConfig (string sResource)
event void OnGamepadConnectionStatus (bool isConnected)
 Event which is called on Gamepad Connection/Disconnection.
event void OnConsoleCommand (string command)

Static Protected Member Functions

static proto bool IsDev ()
 Return true if executable is developer build.

Protected Attributes

World m_World
InputManager m_InputManager
MenuManager m_MenuManager
WorkspaceWidget m_WorkspaceWidget

Detailed Description

Definition at line 7 of file Game.c.

Member Function Documentation

◆ ApplySettingsPreset()

proto external void Game::ApplySettingsPreset ( )
protected

Apply setting preset according to DisplayUserSettings.OverallQuality.

◆ BeginPreload()

proto external bool Game::BeginPreload ( notnull BaseWorld world,
vector pos,
float radius,
int maxTime_sec = 60 )
protected

Begin preloading on given position with given radius. Call is non-blocking, to get status of preload use IsPreloadFinished method.

Parameters
world
posPosition of place which to preload
radiusRadius of area which to preload
maxTime_secMaximum duration of preload in seconds <0, 300>
Returns
Returns true when preload starts, returns false when there is nothing to preload

◆ CreateLoadingAnim()

event LoadingAnim Game::CreateLoadingAnim ( WorkspaceWidget workspaceWidget)
protected

Creates handler for loading screen, its animation and resources. Override this in your Game implementation to customize loading screen look and behavior. Default implementation does nothing.

Parameters
[in]workspaceWidgetThe workspace widget used by the loading screen. LoadingAnim implementation may only use this WorkspaceWidget to work with UI.
Returns
Class implementing loading screen animation. It's fine to return null (though you probably want at least something).

◆ FindEntity()

proto external IEntity Game::FindEntity ( string name)
protected

◆ GetBackendApi()

proto external BackendApi Game::GetBackendApi ( )
protected

Backend Api access class.

◆ GetBackendDebugApi()

proto external BackendDebugApi Game::GetBackendDebugApi ( )
protected

◆ GetBuildTime()

proto external string Game::GetBuildTime ( )
protected

Returns date and time when the game was built.

◆ GetBuildVersion()

proto external string Game::GetBuildVersion ( )
protected

Returns version of the game.

◆ GetDefaultGameConfigs()

event ref array< ResourceName > Game::GetDefaultGameConfigs ( )
protected

◆ GetEngineUserSettings()

proto external UserSettings Game::GetEngineUserSettings ( )
protected

Returns UserSettings container for Engine User Settings.

◆ GetGameUserSettings()

proto external UserSettings Game::GetGameUserSettings ( )
protected

Returns UserSettings container for Game User Settings.

◆ GetInputManager()

sealed InputManager Game::GetInputManager ( )
inlineprotected

Definition at line 14 of file Game.c.

◆ GetLoadTime()

proto external int Game::GetLoadTime ( )
protected

Returns load time in milliseconds for the lastly loaded world.

◆ GetMenuManager()

sealed MenuManager Game::GetMenuManager ( )
inlineprotected

Definition at line 15 of file Game.c.

◆ GetMenuPreset()

event Game::GetMenuPreset ( )
inlineprotected

Definition at line 133 of file Game.c.

◆ GetPlatformService()

proto external PlatformService Game::GetPlatformService ( )
protected

◆ GetRestApi()

proto external RestApi Game::GetRestApi ( )
protected

RESTful Api request access class.

◆ GetScriptModule()

proto external ref ScriptModule Game::GetScriptModule ( )
protected

◆ GetWorkspace()

sealed WorkspaceWidget Game::GetWorkspace ( )
inlineprotected

Definition at line 16 of file Game.c.

◆ GetWorld()

sealed World Game::GetWorld ( )
inlineprotected

Definition at line 13 of file Game.c.

◆ GetWorldEditor()

proto external GameWorldEditor Game::GetWorldEditor ( )
protected

Returns the world editor. IMPORTANT* Only works when InPlayMode is false

◆ GetWorldEntity()

proto external GenericWorldEntity Game::GetWorldEntity ( )
protected

Returns path of world file loaded.

◆ GetWorldFile()

proto external string Game::GetWorldFile ( )
protected

Returns path of world file loaded.

◆ HostGameConfig()

event void Game::HostGameConfig ( )
protected

Called after reload to host a modded scenario.

◆ InPlayMode()

proto external bool Game::InPlayMode ( )
protected

Checks if the game is in playmode (e.g. not in WorldEditor while editing the world)

Returns
True if the game is in play mode. False otherwise.

◆ IsDev()

proto bool Game::IsDev ( )
staticprotected

Return true if executable is developer build.

◆ IsPlayingCinematic()

proto external bool Game::IsPlayingCinematic ( )
protected

◆ IsPreloadFinished()

proto external bool Game::IsPreloadFinished ( )
protected

If preload (started with BeginPreload method) is finished, returns true.

◆ IsSaveStorageAvailable()

proto external bool Game::IsSaveStorageAvailable ( )
protected

Determines the availability of save storage. Game can try to call PlatformService::ObtainSaveDataAsync() which would reinitilize the storage access if possible.

Returns
If the game is capable of accessing save storage.

◆ OnAfterInit()

event void Game::OnAfterInit ( BaseWorld world)
protected

Called after full initialization of Game instance.

◆ OnConsoleCommand()

event void Game::OnConsoleCommand ( string command)
protected

◆ OnEvent()

event void Game::OnEvent ( EventType eventTypeId,
Tuple params )
protected

Called when some system event occur. (NOTE: currently not called because of problems with recursion).

Parameters
eventTypeIdevent type.
paramsTuple object, cast to specific Tuple class to get parameters for particular event.

◆ OnGameEnd()

event void Game::OnGameEnd ( )
protected

Event which is called right before game end.

◆ OnGamepadConnectionStatus()

event void Game::OnGamepadConnectionStatus ( bool isConnected)
protected

Event which is called on Gamepad Connection/Disconnection.

Parameters
isConnectedis false on disconnection, true on re-connection.

◆ OnGameStart()

event bool Game::OnGameStart ( )
inlineprotected

Event which is called right before game starts (all entities are created and initialized). Returns true if the game can start.

Definition at line 158 of file Game.c.

◆ OnInputDeviceIsGamepadEvent()

event void Game::OnInputDeviceIsGamepadEvent ( bool isGamepad)
protected

Event which is called when input device binded to user changes between gamepad and keyboard/mouse, ignoring Joystick and TrackIR.

◆ OnInputDeviceUserChangedEvent()

event void Game::OnInputDeviceUserChangedEvent ( EInputDeviceType oldDevice,
EInputDeviceType newDevice )
protected

Event which is called when input device binded to user changed.

◆ OnUpdate()

event void Game::OnUpdate ( BaseWorld world,
float timeslice )
protected

Called on World update.

Parameters
worldcurrent world
timeslicetime elapsed from last call

◆ OnUserSettingsChangedEvent()

event void Game::OnUserSettingsChangedEvent ( )
protected

Event which is called when user change settings.

◆ OnWindowResize()

event void Game::OnWindowResize ( int w,
int h,
bool windowed )
protected

Event which is called when window size of fullscreen state changed.

Parameters
wnew width of window in screen pixels
hnew height of window in screen pixels
windowedtrue when is windowed, false then fullscreen

◆ OnWorldPostProcess()

event void Game::OnWorldPostProcess ( World world)
protected

Event called once loading of all entities of the world have been finished. (still within the loading).

◆ OnWorldPostSimulatePhysics()

event void Game::OnWorldPostSimulatePhysics ( float timeSlice)
protected

◆ OnWorldSimulatePhysics()

event void Game::OnWorldSimulatePhysics ( float timeSlice)
protected

Event which is called before each fixed step of the physics simulation.

Parameters
timeSlicesimulation step length

◆ PlayGameConfig()

event void Game::PlayGameConfig ( ResourceName sResource,
string addonsList )
protected

◆ ReadGameConfig()

event Managed Game::ReadGameConfig ( string sResource)
protected

◆ ReloadFailureAddons()

proto external int Game::ReloadFailureAddons ( out notnull array< string > addons)
protected

◆ RequestClose()

proto external void Game::RequestClose ( )
protected

Setting request flag for engine to exit the game.

◆ RequestReload()

proto external void Game::RequestReload ( array< string > addonGUIDs = null)
protected

Setting request flag for the engine to reinitialize the game Doesn't do anything in Workbench.

◆ SaveUserSettings()

proto external void Game::SaveUserSettings ( )
protected

Save Engine User Settings to permanent storage.

◆ SpawnEntity()

proto external IEntity Game::SpawnEntity ( typename typeName ,
BaseWorld world = null,
EntitySpawnParams params = null )
protected

Safely instantiate the entity and calls EOnInit if the entity sets event mask EntityEvent.INIT.

Parameters
typeNameName of entity's type to instantiate.
Returns
instantiated entity

◆ SpawnEntityPrefab()

proto external IEntity Game::SpawnEntityPrefab ( notnull Resource templateResource,
BaseWorld world = null,
EntitySpawnParams params = null )
protected

Safely instantiate the entity from template (with all components) and calls EOnInit if the entity sets event mask EntityEvent.INIT.

Parameters
templateResourceTemplate resource of the entity to instantiate.
Returns
instantiated entity

◆ StartCinematic()

proto external void Game::StartCinematic ( string name)
protected

◆ StopCinematic()

proto external void Game::StopCinematic ( )
protected

◆ UserSettingsChanged()

proto external void Game::UserSettingsChanged ( )
protected

Notify engine about changes in Engine User Settings.

Member Data Documentation

◆ m_InputManager

InputManager Game::m_InputManager
protected

Definition at line 10 of file Game.c.

◆ m_MenuManager

MenuManager Game::m_MenuManager
protected

Definition at line 11 of file Game.c.

◆ m_WorkspaceWidget

WorkspaceWidget Game::m_WorkspaceWidget
protected

Definition at line 12 of file Game.c.

◆ m_World

World Game::m_World
protected

Definition at line 9 of file Game.c.


The documentation for this class was generated from the following file:
  • scripts/GameLib/generated/Game.c