2026-01-07 12:00:57 +05:30
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class ImpactState : BaseState
|
|
|
|
|
{
|
2026-01-07 19:38:03 +05:30
|
|
|
public ImpactState(AICarDriver aiCarDriver, GameplayManager gameplayManager) : base(aiCarDriver, gameplayManager)
|
2026-01-07 12:00:57 +05:30
|
|
|
{
|
|
|
|
|
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");
|
2026-01-07 19:38:03 +05:30
|
|
|
|
|
|
|
|
// do actions when an impact happens
|
|
|
|
|
base.Exit();
|
|
|
|
|
nextState = new RecoverState(aiCarDriver, gameplayManager);
|
2026-01-07 12:00:57 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Exit()
|
|
|
|
|
{
|
|
|
|
|
base.Exit();
|
|
|
|
|
|
|
|
|
|
Debug.Log($"### {this} Exit STAGE");
|
|
|
|
|
}
|
|
|
|
|
}
|