Skip to main content

PlayerStateFactory

A class in Root.Township, Alta.PlayerStates.

Creates player state objects by PlayerStateType. Injected through VContainer as IPlayerStateFactory.

Constructors​

MemberWhat it is
PlayerStateFactory(IPostProcessController postProcessController)Creates a PlayerStateFactory from postProcessController.

Fields​

2 private and internal fields
MemberWhat it is
private DownedStateDebuffManager debuffManagerOne DownedStateDebuffManager shared by every DownedState this factory makes.
private readonly IPostProcessController postProcessControllerPost-process controller handed to new customization states.

Methods​

MemberWhat it is
IPlayerState CreateNewPlayerState(PlayerStateType stateType, IPlayerState baseStateForDecorators)Makes a new state of the given type. Decorator states (combat, equipment, spirit, downed) get the PlayingState found under the given base state.
1 private and internal method
MemberWhat it is
private static T FindStateOfType<T>(IPlayerState stateToSearch)Walks down a state's BaseState chain and returns the first state of the given type, or null.