void Awake() { agent = GetComponent <NavMeshAgent>(); currentState = new VehicleOperableState(); currentState.Execute(this); }
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); }