PlayingState
A class in Root.Township, Alta.PlayerStates.
The player state for normally playing in the world. On the server, entering it spawns a player controller for the player's mode and adds transitions to combat, downed, customization and spirit.
- Listed in Players and characters
- Inherits or implements
PlayerStateBase - Derived types
CombatState,DownedState,EquipmentState,PlayingToSpiritTransition,SpiritState,SpiritToPlayingTransition,CustomizationToPlayingTransition,DeadToPlayingTransition,DownedToPlayingTransition,EquipmentToPlayingTransition,FirstJoinToPlayingTransition,PlayingToCombatTransition,PlayingToCustomizationTransition,PlayingToDeadTransition,PlayingToDownedTransition,PlayingToEquipmentTransition - Documented in Player states
Constructors
| Member | What it is |
|---|---|
PlayingState() | Creates a PlayingState with default values. |
Properties
| Member | What it is |
|---|---|
bool IsRespawning { get; set; } | Set by the dead to playing transition so the new controller spawns at the respawn point. |
override string Name { get; set; } | Display name, "Playing State". |
PlayingStateSettings Settings { get; } | The state's settings cast to PlayingStateSettings. |
override PlayerStateType StateType { get; } | Always PlayerStateType.Playing. |
Methods
| Member | What it is |
|---|---|
override void SyncStateEnter(Stream stream) | Sends nothing extra when entering. |
override void SyncStateLeave(Stream stream) | Sends nothing extra when leaving. |
protected override void OnActivate() | Server: spawns a new player controller and adds the transitions out of playing. |
protected override void OnActivateRemote(bool isPlayerCharacterSpawned) | Client: adds the transition to the equipment state for the local player. |
protected override void OnDeactivateRemote(bool isPlayerCharacterSpawned) | Client: removes the equipment transition for the local player. |
protected override void OnDecorated(IPlayerState baseState, IPlayerState decorator) | Server: turns off the playing to combat transition while another state (other than equipment) decorates this one. |
protected override void OnDecoratedRemote(IPlayerState baseState, IPlayerState decorator) | Client: turns off the equipment transition for the local player while decorated. |
protected override void OnUndecorated(IPlayerState baseState, IPlayerState decorator) | Server: turns the combat transition back on when a non-equipment decorator is removed. |
protected override void OnUndecoratedRemote(IPlayerState baseState, IPlayerState decorator) | Client: turns the equipment transition back on for the local player. |
1 private and internal method
Used in
Members of other types that take, return or hold a PlayingState: