class MAGES::Analytics::MAGESAnalytics¶
Overview¶
The MAGES analytics module implementation. More…
class MAGESAnalytics: public MAGES::AnalyticsModule { public: // enums enum ScoringMergePolicy; // properties float SuccessThreshold; GameObject SessionOverviewPrefab; bool RuntimeAnalyticsNotifications; ScoringMergePolicy ActionScoringMergePolicy; SerializableDictionaryGuidMap; Dictionary Queries; Dictionary Events; JObject ExportedData; MAGESAnalyticsRuntime AnalyticsRuntime; // methods virtual override void InitializeTimer(); virtual override void InvalidateTimer(); virtual override double GetTimeSinceStartUp(); double GetRealTimeSinceStartUp(); virtual override void Startup(); virtual override void Shutdown(); virtual override TEvent AddEvent< TEvent >(string name); virtual override TQuery AddQuery< TQuery >(string name); virtual override void RemoveEvent< TEvent >(string name); virtual override void RemoveQuery< TQuery >(string name); virtual override TEvent GetEvent< TEvent >(string name); virtual override TQuery GetQuery< TQuery >(string name); virtual override void ExportAll(); virtual override void ExportQueries(string tag = ""); virtual override void ExportEvents(string tag = ""); };
Inherited Members¶
public: // properties string ExportPath; // methods virtual abstract void Startup() = 0; virtual abstract void Shutdown() = 0; virtual abstract void InitializeTimer() = 0; virtual abstract void InvalidateTimer() = 0; virtual abstract double GetTimeSinceStartUp() = 0; virtual abstract TQuery AddQuery< TQuery >(string name) = 0; virtual abstract TQuery GetQuery< TQuery >(string name) = 0; virtual abstract void RemoveQuery< TQuery >(string name) = 0; virtual abstract TEvent AddEvent< TEvent >(string name) = 0; virtual abstract TEvent GetEvent< TEvent >(string name) = 0; virtual abstract void RemoveEvent< TEvent >(string name) = 0; virtual abstract void ExportAll() = 0; virtual abstract void ExportQueries(string tag = "") = 0; virtual abstract void ExportEvents(string tag = "") = 0;
Detailed Documentation¶
The MAGES analytics module implementation.
Properties¶
float SuccessThreshold
Gets or sets the score threshold for a successful operation.
If the score is above or equal to this value, the operation is considered successful. If the score is below this value, the operation is considered a failure. The accepted values are between 0-100.
GameObject SessionOverviewPrefab
Gets or sets the Session overview prefab which gets displayed on operation end.
bool RuntimeAnalyticsNotifications
Gets or sets a value indicating whether the analytics notifications will be displayed or not.
ScoringMergePolicy ActionScoringMergePolicy
Gets or sets the policy for calculating the score of actions that are performed multiple times.
SerializableDictionaryGuidMap
Gets or sets the dictionary that contains the mapping between filenames and guids.
DictionaryQueries
Gets the analytics queries.
DictionaryEvents
Gets the analytics events.
JObject ExportedData
Gets or sets the JObject holding all the exported data of the operation.
MAGESAnalyticsRuntime AnalyticsRuntime
Gets the analytics runtime.
Methods¶
virtual override void InitializeTimer()
Intializes the analytics timer.
virtual override void InvalidateTimer()
Invalidates the analytics timer and resets it.
virtual override double GetTimeSinceStartUp()
Gets the time since the last valid start up of the analytics timer in seconds.
Returns:
The time since the last valid start up of the analytics timer in seconds.
double GetRealTimeSinceStartUp()
Gets the time since the start of the operation.
Returns:
The time since the start of the operation.
virtual override void Startup()
Called when the module is started (usually on application start).
virtual override void Shutdown()
Called when the module is destroyed or replaced.
virtual override TEvent AddEvent< TEvent >(string name)
Creates a new event and stores it under the given name.
Parameters:
TEvent |
The type of the requested event. |
name |
The name of the event. |
Returns:
The newly created event.
virtual override TQuery AddQuery< TQuery >(string name)
Creates a new query and stores it under the given name.
Parameters:
TQuery |
The type of the new query. |
name |
The name of the query. |
Returns:
The newly created query.
virtual override void RemoveEvent< TEvent >(string name)
Removes a stored event under the given name.
Parameters:
TEvent |
The type of the requested query. |
name |
The name of the query. |
virtual override void RemoveQuery< TQuery >(string name)
Removes a stored query under the given name.
Parameters:
TQuery |
The type of the requested query. |
name |
The name of the query. |
virtual override TEvent GetEvent< TEvent >(string name)
Retrieves a stored event under the given name.
Parameters:
TEvent |
The type of the requested event. |
name |
The name of the requested event. |
Returns:
The requested event.
virtual override TQuery GetQuery< TQuery >(string name)
Retrieves a stored query under the given name.
Parameters:
TQuery |
The type of the requested query. |
name |
The name of the requested query. |
Returns:
The requested query.
virtual override void ExportAll()
Exports all analytics data.
virtual override void ExportQueries(string tag = "")
Export all queries.
Parameters:
tag |
The queries with this tag will be exported. Everything is exported if empty. |
virtual override void ExportEvents(string tag = "")
Exports all events.
Parameters:
tag |
The events with this tag will be exported. Everything is exported if empty. |