using UnityEngine; public class ImpactState : BaseState { public ImpactState(AICarDriver aiCarDriver, GameplayManager gameplayManager) : base(aiCarDriver, gameplayManager) { Debug.Log($"### {this} constructor"); } protected override void Enter() { base.Enter(); Debug.Log($"### {this} Enter STAGE"); } protected override void Update() { base.Update(); Debug.Log($"### {this} Update STAGE"); // do actions when an impact happens base.Exit(); nextState = new RecoverState(aiCarDriver, gameplayManager); } protected override void Exit() { base.Exit(); Debug.Log($"### {this} Exit STAGE"); } }