CreatureState Class

Summary

Base class for the various states a Animancer.Examples.StateMachines.Platformer.Creature can be in and actions they can perform.
graph BT Type-->Base0["StateBehaviour<CreatureState>"] Base0-->Base1["MonoBehaviour"] Type-.->Interface0["IOwnedState<CreatureState>"] Type-.->Interface1["IState<CreatureState>"] Type["CreatureState"] class Type type-node Derived0["TimelineState"]-->Type click Derived0 "/animancer/api/Animancer.Examples.StateMachines.Platformer/TimelineState" Derived1["AttackState"]-->Type click Derived1 "/animancer/api/Animancer.Examples.StateMachines.Platformer/AttackState" Derived2["JumpState"]-->Type click Derived2 "/animancer/api/Animancer.Examples.StateMachines.Platformer/JumpState" Derived3["IdleState"]-->Type click Derived3 "/animancer/api/Animancer.Examples.StateMachines.Platformer/IdleState" Derived4["DieState"]-->Type click Derived4 "/animancer/api/Animancer.Examples.StateMachines.Platformer/DieState"

Syntax

[HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(StateMachines) + "." + nameof(Platformer) + "/" + nameof(CreatureState))]
public abstract class CreatureState : StateBehaviour<CreatureState>, IOwnedState<CreatureState>, 
    IState<CreatureState>

Examples

Platformer

Attributes

Type Description
HelpURLAttribute

Properties

Name Value Summary
Creature Creature
The Examples.PlatformerCreature that owns this state.
MovementSpeed float
The current speed at which this state allows the creature to move.
OwnerStateMachine StateMachine<CreatureState>
The Animancer.FSM.StateMachine`1 that this state is used in.

Methods

Name Value Summary
SetCreature(Creature) void
Sets the Animancer.Examples.StateMachines.Platformer.CreatureState.Creature.