26 lines
564 B
C#
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();
|
||
|
|
}
|
||
|
|
}
|