PlayerStateFactory
Contains all the available Player States.
using UnityEngine;
namespace cowsins
{
public class PlayerCustomState : PlayerBaseState
{
public PlayerCustomState (PlayerStates currentContext, PlayerStateFactory playerStateFactory)
: base(currentContext, playerStateFactory) { }
public override void EnterState()
{
// Do something on entering the state
}
public override void UpdateState()
{
CheckSwitchState();
}
public override void FixedUpdateState() { }
public override void ExitState() {
// Do something on exiting the state
}
public override void CheckSwitchState() { }
public override void InitializeSubState() { }
}
}
public PlayerBaseState Die() { return new PlayerCustomState(_context, this); }
List of Available PlayerStates
PlayerDefaultState
PlayerJumpState
PlayerDeadState
PlayerDashState
PlayerCrouchState
PlayerClimbState
Last updated