Skip to main content

PlayerOrbLight

A class in Root.Township, the global namespace.

Made by PlayerUnlockManager to set the player's light brightness from how many orbs they have. Its checks are contradictory (it only hooks up on headless and only updates when not headless), so it never changes the light.

Constructors​

MemberWhat it is
PlayerOrbLight(PlayerUnlockManager unlockManager)Creates a PlayerOrbLight from unlockManager.

Fields​

2 private and internal fields
MemberWhat it is
private Player playerThe player whose light is set.
private PlayerUnlockManager unlockManagerThe PlayerUnlockManager whose orbs are counted.

Methods​

3 private and internal methods
MemberWhat it is
private void TryUpdatePlayerLightIntensity()Calls UpdatePlayerLightIntensity if not headless and the player has a controller and light.
private void UpdatePlayerLightIntensity()Sets the player light's intensity for the current orb count.
private void UpdatePlayerLightIntensityOnNewController(Player playerCaller, PlayerController playercontroller)Handles PlayerControllerSet by trying the update again.