2026-01-07 12:00:57 +05:30
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class AcquireTargetState : BaseState
|
|
|
|
|
{
|
2026-01-07 19:38:03 +05:30
|
|
|
public AcquireTargetState(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
|
|
|
|
|
|
|
|
// while it's roaming check for targets
|
|
|
|
|
// Find the target and once the target is found then charge toward that specific target
|
|
|
|
|
if (HasFoundTarget())
|
|
|
|
|
{
|
|
|
|
|
base.Exit();
|
|
|
|
|
nextState = new ChargeState(aiCarDriver, gameplayManager);
|
|
|
|
|
}
|
2026-01-07 12:00:57 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Exit()
|
|
|
|
|
{
|
|
|
|
|
base.Exit();
|
|
|
|
|
|
|
|
|
|
Debug.Log($"### {this} Exit STAGE");
|
|
|
|
|
}
|
2026-01-07 19:38:03 +05:30
|
|
|
|
|
|
|
|
public bool HasFoundTarget()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2026-01-07 12:00:57 +05:30
|
|
|
}
|