// Will update the Objective text to show where to pick up client void DisplayPickUpObj(CustomerSO so) { if (so.PickupObjectiveTxt != null) { objectiveText.text = so.PickupObjectiveTxt; } }
// Will update the Objective text to show where to drop off client void DisplayDropOffObj(CustomerSO so) { if (so.DropoffObjectiveTxt != null) { objectiveText.text = so.DropoffObjectiveTxt; } }
private void RideCompleted(CustomerSO so) { _currentRide.onRideSuccessful?.Invoke(_currentCustomer); //_currencyManager.Amount += _currentRide.RideCashReward; _currentCustomer = null; _currentRide = null; }
//Will Give player full controls on accepting client private void RideAccepted(CustomerSO customerSo) { GiveMovementControl(); Invoke(nameof(GiveRotationControl), 2f); _rideManager.onRideAccepted.RemoveListener(RideAccepted); tutorialCanvas.SetActive(false); StartCoroutine(OnboardingControlsPanel()); }
public bool TryAcceptNewCustomer(CustomerSO so) { if (_rideManager.IsRideActive || !_customerSos.Contains(so)) { return(false); } _rideManager.AcceptRide(so); _customerSos.Remove(so); return(true); }
public void Init(CustomerSO customerData, UberApplication app) { _uberApp = app; _navListProvider = app.ListProvider; _customerSO = customerData; customerFace.sprite = customerData.CustomerFace; customerName.text = customerData.CustomerName; _navListProvider.AddToList(this); }
public void AcceptRide(CustomerSO customerSo) { if (IsRideActive) { return; } _currentRide = customerSo.CustomerRide; _currentCustomer = customerSo; RideAccepted(); }
// Will update the Objective text to clear the text void ClearText(CustomerSO so) { objectiveText.text = ""; }
//Destroys itself when the onboarding process is completed private void FinishOnBoarding(CustomerSO customerSo) { //Do what we need to do _rideManager.onCustomerDroppedOff.RemoveListener(FinishOnBoarding); Destroy(gameObject); }
private IEnumerator InvokeWithDelay(UnityEvent <CustomerSO> enventToInvoke, float time, CustomerSO data) { if (_isRunning) { yield break; } _isRunning = true; //pickUpDropOff.PlayCutscene(); yield return(new WaitForSeconds(time)); enventToInvoke?.Invoke(data); _isRunning = false; }
public void InvokeCostumerEvents(UnityEvent <CustomerSO> enventToInvoke, CustomerSO data) { enventToInvoke?.Invoke(data); }