AdvancedJumpState Class

Summary

A more complex Animancer.Examples.StateMachines.Platformer.JumpState that allows you to hold the button down to jump higher.
graph BT Type-->Base0["JumpState"] click Base0 "/animancer/api/Animancer.Examples.StateMachines.Platformer/JumpState" Base0-->Base1["CreatureState"] click Base1 "/animancer/api/Animancer.Examples.StateMachines.Platformer/CreatureState" Base1-->Base2["StateBehaviour<CreatureState>"] Base2-->Base3["MonoBehaviour"] Type-.->Interface0["IOwnedState<CreatureState>"] Type-.->Interface1["IState<CreatureState>"] Type["AdvancedJumpState"] class Type type-node

Syntax

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

Examples

Platformer

Attributes

Type Description
AddComponentMenu
HelpURLAttribute

Properties

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

Methods

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