Пример #1
0
 // Will update the Objective text to show where to pick up client
 void DisplayPickUpObj(CustomerSO so)
 {
     if (so.PickupObjectiveTxt != null)
     {
         objectiveText.text = so.PickupObjectiveTxt;
     }
 }
Пример #2
0
 // Will update the Objective text to show where to drop off client
 void DisplayDropOffObj(CustomerSO so)
 {
     if (so.DropoffObjectiveTxt != null)
     {
         objectiveText.text = so.DropoffObjectiveTxt;
     }
 }
Пример #3
0
 private void RideCompleted(CustomerSO so)
 {
     _currentRide.onRideSuccessful?.Invoke(_currentCustomer);
     //_currencyManager.Amount += _currentRide.RideCashReward;
     _currentCustomer = null;
     _currentRide     = null;
 }
Пример #4
0
 //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());
 }
Пример #5
0
 public bool TryAcceptNewCustomer(CustomerSO so)
 {
     if (_rideManager.IsRideActive || !_customerSos.Contains(so))
     {
         return(false);
     }
     _rideManager.AcceptRide(so);
     _customerSos.Remove(so);
     return(true);
 }
Пример #6
0
        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);
        }
Пример #7
0
        public void AcceptRide(CustomerSO customerSo)
        {
            if (IsRideActive)
            {
                return;
            }

            _currentRide     = customerSo.CustomerRide;
            _currentCustomer = customerSo;
            RideAccepted();
        }
Пример #8
0
 // Will update the Objective text to clear the text
 void ClearText(CustomerSO so)
 {
     objectiveText.text = "";
 }
Пример #9
0
 //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);
 }
Пример #10
0
        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;
        }
Пример #11
0
 public void InvokeCostumerEvents(UnityEvent <CustomerSO> enventToInvoke, CustomerSO data)
 {
     enventToInvoke?.Invoke(data);
 }