2026-01-07 12:00:57 +05:30
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class ChargeState : BaseState
|
|
|
|
|
{
|
2026-01-07 19:38:03 +05:30
|
|
|
public ChargeState(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");
|
2026-01-07 19:38:03 +05:30
|
|
|
// update the values for charging
|
2026-01-07 12:00:57 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Update()
|
|
|
|
|
{
|
|
|
|
|
base.Update();
|
|
|
|
|
|
|
|
|
|
Debug.Log($"### {this} Update STAGE");
|
2026-01-07 19:38:03 +05:30
|
|
|
aiCarDriver.UpdateMovement(() =>
|
|
|
|
|
{
|
|
|
|
|
base.Exit();
|
|
|
|
|
nextState = new ImpactState(aiCarDriver, gameplayManager);
|
|
|
|
|
});
|
2026-01-07 12:00:57 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Exit()
|
|
|
|
|
{
|
|
|
|
|
base.Exit();
|
|
|
|
|
|
|
|
|
|
Debug.Log($"### {this} Exit STAGE");
|
|
|
|
|
}
|
|
|
|
|
}
|