ashby-games/Unity/CarsDash/Assets/Scripts/FSM/AIStateProcesser.cs
Ashby Issac c466e28d6c AI FSM changes.
- Protoyped on the AI movement, found solutions for turns and
   moving after impacting the player.
- Created a full base for AI state machine.
- Worked on binding the core AI logic with the finite state machine.
2026-01-07 19:38:03 +05:30

26 lines
564 B
C#

using System;
using UnityEngine;
public class AIStateProcesser : MonoBehaviour
{
private BaseState currentState;
private AICarDriver carDriverAI;
private AICarController aiCarController;
private void Awake()
{
carDriverAI = GetComponent<AICarDriver>();
aiCarController = GetComponent<AICarController>();
}
private void Start()
{
currentState = new IdleState(carDriverAI, aiCarController.GameplayManager);
}
private void Update()
{
currentState = currentState.ProcessStates();
}
}