2023-08-23 01:59:40 +08:00
|
|
|
using BITKit.Entities;
|
|
|
|
using BITKit.StateMachine;
|
2023-08-27 02:58:19 +08:00
|
|
|
using Lightbug.CharacterControllerPro.Core;
|
2023-08-23 01:59:40 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
2023-08-27 02:58:19 +08:00
|
|
|
namespace BITFALL.Entities.Player.Movement.States
|
2023-08-23 01:59:40 +08:00
|
|
|
{
|
|
|
|
public abstract class PlayerCharacterState : IEntityMovementState
|
|
|
|
{
|
2023-08-27 02:58:19 +08:00
|
|
|
[SerializeField] protected PlayerCharacterController characterController;
|
|
|
|
[SerializeField] protected CharacterActor actor;
|
2023-08-23 01:59:40 +08:00
|
|
|
public bool Enabled { get; set; }
|
|
|
|
public virtual void Initialize()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void OnStateEntry(IState old)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-08-27 02:58:19 +08:00
|
|
|
public virtual void OnStateUpdate(float deltaTime)
|
2023-08-23 01:59:40 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void OnStateExit(IState old, IState newState)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void UpdateVelocity(ref Vector3 currentVelocity,float deltaTime)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void UpdateRotation(ref Quaternion currentRotation,float deltaTime)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void BeforeUpdateMovement(float deltaTime)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void AfterUpdateMovement(float deltaTime)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
public virtual void ExecuteCommand<T>(T command)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|