using UnityEngine; public class ChargeState : BaseState { public ChargeState(AICarDriver aiCarDriver, GameplayManager gameplayManager) : base(aiCarDriver, gameplayManager) { Debug.Log($"### {this} constructor"); } protected override void Enter() { base.Enter(); Debug.Log($"### {this} Enter STAGE"); // update the values for charging } protected override void Update() { base.Update(); Debug.Log($"### {this} Update STAGE"); aiCarDriver.UpdateMovement(() => { base.Exit(); nextState = new ImpactState(aiCarDriver, gameplayManager); }); } protected override void Exit() { base.Exit(); Debug.Log($"### {this} Exit STAGE"); } }