PlayerUnlockAnalytics
A class in Root.Township, ATT.Progression.
Sends challenge analytics (start, exit, respawn) for a player's unlock challenge. Created with a PlayerUnlockManager; only sends for the local player in SpiritState.
- Listed in ATT, Features and other game namespaces
Constructors
| Member | What it is |
|---|---|
PlayerUnlockAnalytics(PlayerUnlockManager unlockManager, IAnalyticsService analyticsService) | Built by the game's dependency injection (VContainer), which passes the services in. |
Fields
| Member | What it is |
|---|---|
static string RecentCheckpointName | Name of the last challenge checkpoint passed, set by SetChallengeCheckpointTriggerEvent and cleared after a respawn event. |
2 private and internal fields
| Member | What it is |
|---|---|
private readonly IAnalyticsService analyticsService | Analytics service the events go to. |
private readonly PlayerUnlockManager unlockManager | The player's unlock manager, used for the current unlock and orb count. |
Methods
6 private and internal methods
| Member | What it is |
|---|---|
private bool CanSendChallengeEvent(Player player, IPlayerState playerState) | True when the player is the local player and the state is SpiritState. |
private bool CanSendChallengeRespawnEvent(EffectHandler.TeleportType teleportType) | True for a challenge reposition teleport while the player is in the challenge. |
private void SendChallengeExitEvent(IPlayerState playerState) | Sends "Exited Challenge" when the spirit state ends. |
private void SendChallengeRespawnEvent(EffectHandler.TeleportType teleportType) | Sends "Respawned during Challenge" with the last checkpoint name. |
private void SendChallengeStartEvent(IPlayerState playerState) | Sends "Started Challenge" when the spirit state starts. |
private void SetupRespawnEvent(Player player, PlayerController playerController) | Hooks the controller's PlayerEffectController.PlayerRepositioned to send respawn events. |