Skip to main content

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.

Constructors​

MemberWhat it is
PlayerUnlockAnalytics(PlayerUnlockManager unlockManager, IAnalyticsService analyticsService)Built by the game's dependency injection (VContainer), which passes the services in.

Fields​

MemberWhat it is
static string RecentCheckpointNameName of the last challenge checkpoint passed, set by SetChallengeCheckpointTriggerEvent and cleared after a respawn event.
2 private and internal fields
MemberWhat it is
private readonly IAnalyticsService analyticsServiceAnalytics service the events go to.
private readonly PlayerUnlockManager unlockManagerThe player's unlock manager, used for the current unlock and orb count.

Methods​

6 private and internal methods
MemberWhat 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.