CharacterState Class

Summary

Base class for the various states a Platformer.Character can be in and actions they can perform.
graph BT Type-->Base0["StateBehaviour"] Type-.->Interface0["IOwnedState<CharacterState>"] Type["CharacterState"] class Type type-node Derived0["FlinchState"]-->Type click Derived0 "/platformer/api/PlatformerGameKit.Characters.States/FlinchState" Derived1["IntroductionState"]-->Type click Derived1 "/platformer/api/PlatformerGameKit.Characters.States/IntroductionState" Derived2["MultiState"]-->Type click Derived2 "/platformer/api/PlatformerGameKit.Characters.States/MultiState" Derived3["AttackState"]-->Type click Derived3 "/platformer/api/PlatformerGameKit.Characters.States/AttackState" Derived4["IdleState"]-->Type click Derived4 "/platformer/api/PlatformerGameKit.Characters.States/IdleState" Derived5["JumpState"]-->Type click Derived5 "/platformer/api/PlatformerGameKit.Characters.States/JumpState" Derived6["WallSlideState"]-->Type click Derived6 "/platformer/api/PlatformerGameKit.Characters.States/WallSlideState" Derived7["LandState"]-->Type click Derived7 "/platformer/api/PlatformerGameKit.Characters.States/LandState" Derived8["LocomotionState"]-->Type click Derived8 "/platformer/api/PlatformerGameKit.Characters.States/LocomotionState"

Syntax

[HelpURL(APIDocumentation + nameof(CharacterState))]
public abstract class CharacterState : StateBehaviour, IOwnedState<CharacterState>

Remarks

Documentation: States

Attributes

Type Description
HelpURLAttribute

Fields

Name Constant Value Summary
APIDocumentation https://kybernetik.com.au/platformer/api/PlatformerGameKit.Characters.States/
The URL of the website where the PlatformerGameKit.Characters.States API documentation is hosted.
static
MenuPrefix Platformer Game Kit/Characters/States/
The menu prefix for UnityEngine.AddComponentMenu.
static

Properties

Name Value Summary
CanTurn bool
Character Character
The Examples.PlatformerCharacter that owns this state.
MovementSpeedMultiplier float
OwnerStateMachine StateMachine<CharacterState>

Methods

Name Value Summary
OnValidate() void
[Editor-Only] Ensures that all fields have valid values and finds missing components nearby.
SetCharacter(Character) void
Sets the PlatformerGameKit.Characters.States.CharacterState.Character.