void Awake()
        {
            agent = GetComponent <NavMeshAgent>();

            currentState = new VehicleOperableState();
            currentState.Execute(this);
        }
Exemple #2
0
 public void ExecuteStateUpdate()
 {
     if (currentState != null)
     {
         currentState.Execute();
     }
 }
 public void Damaged()
 {
     currentState = new VehicleDamagedState();
     currentState.Execute(this);
 }
 public void UnOperable()
 {
     currentState = new VehicleUnOperableState();
     currentState.Execute(this);
 }