ORK Framework  2.25.2
API Documentation
ORKFramework.GameHandler Class Reference

The game handler is managing data related to a running game, e.g. the player groups, game variables, factions, game time, language, difficulty, ... More...

Inheritance diagram for ORKFramework.GameHandler:
ORKFramework.ISaveData

Public Member Functions

void Clear (bool initVariables)
 
void Init ()
 
void FadeGlobalVolume (float toVolume, EaseType interpolation, float time)
 
void FadeMusicVolume (float toVolume, EaseType interpolation, float time)
 
void FadeSoundVolume (float toVolume, EaseType interpolation, float time)
 
void SetRandomBattleFactor (float factor, float time)
 
GameObject GetPlayer ()
 
void SetArea (int id, bool show)
 
void SetExchangeRate (int currencyID, float rate)
 
float GetExchangeRate (int currencyID)
 
int ExchangeCurrency (int currencyID, float money, int newCurrencyID)
 
void PauseGame (bool pause, bool setPauseTime, bool setFreezePause)
 
void FreezeTime (bool freeze)
 
void PauseTime (bool pause)
 
string GetTimeString ()
 
string GetTimeString (float t)
 
void ResetTimeScale ()
 
void ResetUnityTimeScale ()
 
void ChangeGlobalObjects (string key, List< GameObject > list, ListChangeType changeType)
 
List< GameObject > GetGlobalObjects (string key)
 
void GetGlobalObjects (string key, ref List< GameObject > list)
 
int GlobalObjectsCount (string key)
 
void NewGame (bool loadScene)
 
void CallStartEvent ()
 
void StoreScene (LoadSceneMode loadSceneMode, bool loadAsync)
 
SceneTarget GetStoredScene ()
 
void ClearStoredScene ()
 
void GameOver ()
 
void CheckGameOver ()
 
void CallGameOverChoice ()
 
void LoadMainMenuScene ()
 
void SceneLoaded ()
 
void LoadAllActiveScenes ()
 
void SceneLoaded (string sceneName)
 
void Tick ()
 
DataObject SaveGame ()
 Used to save the data - you need to add the data to a ORKFramework.DataObject. More...
 
void LoadGame (DataObject data)
 Used to load the data - you need to get the data from the ORKFramework.DataObject. More...
 

Static Public Member Functions

static GameHandler Instance ()
 

Properties

bool Running [get, set]
 
Camera Camera [get, set]
 
int Language [get, set]
 
int Difficulty [get, set]
 
int AutoSaveSlot [get, set]
 
float GlobalVolume [get, set]
 
float MusicVolume [get, set]
 
float RealMusicVolume [get]
 
float SoundVolume [get, set]
 
float RealSoundVolume [get]
 
int TextSpeed [get, set]
 
float RandomBattleChance [get, set]
 
float RandomBattleFactor [get]
 
PlayerHandler PlayerHandler [get]
 
Group ActiveGroup [get]
 
int AreaID [get]
 
LogHandler Logs [get]
 
QuestHandler Quests [get]
 
BestiaryHandler Bestiary [get]
 
bool Paused [get]
 
bool TimePaused [get]
 
float GameTime [get, set]
 
float? TimeScale [get, set]
 
float UnityTimeScale [get, set]
 
float DeltaTime [get]
 
float DeltaMovementTime [get]
 
float DeltaBattleTime [get]
 
float AnimationFactor [get]
 
VariableHandler Variables [get]
 
SceneHandler Scene [get]
 
CombatantHandler Combatants [get]
 
InteractionHandler Interactions [get]
 
FactionHandler Faction [get]
 
ConsoleHandler Console [get]
 

Detailed Description

The game handler is managing data related to a running game, e.g. the player groups, game variables, factions, game time, language, difficulty, ...

Member Function Documentation

◆ LoadGame()

void ORKFramework.GameHandler.LoadGame ( DataObject  data)

Used to load the data - you need to get the data from the ORKFramework.DataObject.

Parameters
dataA ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

◆ SaveGame()

DataObject ORKFramework.GameHandler.SaveGame ( )

Used to save the data - you need to add the data to a ORKFramework.DataObject.

Returns
A ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.