JumpState Class

Summary

A Animancer.Examples.StateMachines.Platformer.CreatureState that plays a jump animation and applies some upwards force.
graph BT Type-->Base0["CreatureState"] click Base0 "/animancer/api/Animancer.Examples.StateMachines.Platformer/CreatureState" Base0-->Base1["StateBehaviour<CreatureState>"] Base1-->Base2["MonoBehaviour"] Type-.->Interface0["IOwnedState<CreatureState>"] Type-.->Interface1["IState<CreatureState>"] Type["JumpState"] class Type type-node Derived0["AdvancedJumpState"]-->Type click Derived0 "/animancer/api/Animancer.Examples.StateMachines.Platformer/AdvancedJumpState"

Syntax

[AddComponentMenu(Strings.ExamplesMenuPrefix + "Platformer - Jump State")]
[HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(StateMachines) + "." + nameof(Platformer) + "/" + nameof(JumpState))]
public class JumpState : CreatureState, IOwnedState<CreatureState>, IState<CreatureState>

Examples

Platformer

Attributes

Type Description
AddComponentMenu
HelpURLAttribute

Properties

Name Value Summary
AnimancerState AnimancerState
Creature Creature
The Examples.PlatformerCreature that owns this state.
Inherited from CreatureState
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.
Inherited from CreatureState

Methods

Name Value Summary
CalculateJumpSpeed(float) float
CanEnterState(CreatureState) bool
Determines whether the Animancer.FSM.StateMachine`1 can enter this state. Always returns true unless overridden.
FixedUpdate() void
OnEnable() void
SetCreature(Creature) void
Sets the Animancer.Examples.StateMachines.Platformer.CreatureState.Creature.
Inherited from CreatureState