37 lines
793 B
C#
Raw Permalink Normal View History

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