Exemple #1
0
 public void RemoveCustomer(Customer customer, ZoneFeedbackIcon.Icons icon)
 {
     // CHECK IF CUSTOMER BEING DISPLAYED IN PANEL
     FireFeedbackToZones(icon, customer);
     God.instance.zonePanelManager.RemoveCustomer(customer, icon);
     customers.Remove(customer);
     customer.currentZone = null;
     zoneViews.ForEach((zoneView) =>
     {
         zoneView.UpdateCustomerNumber();
     });
     if (customer == currentlyProcessedCustomer)
     {
         processingCustomer = false;
     }
     foreach (CustomerIcon customerIcon in GetComponentsInChildren <CustomerIcon>())
     {
         if (customerIcon.referredCustomer == customer)
         {
             customerIcon.Die();
         }
     }
     CheckIfQueueIsFull();
     // StartCustomerProcessing();
 }
Exemple #2
0
    public void FireFeedback(ZoneFeedbackIcon.Icons icon)
    {
        GameObject feedbackIcon = Instantiate(God.instance.zoneFeedbackIconPrefab, feedbackIconSpawner.transform.position, Quaternion.identity) as GameObject;

        feedbackIcon.GetComponent <ZoneFeedbackIcon>().zoneIcon = icon;
        feedbackIcon.SetParent(feedbackIconSpawner);
    }
Exemple #3
0
 public void FireFeedbackToZones(ZoneFeedbackIcon.Icons icon, Customer customer)
 {
     //if (God.instance.zonePanelManager.displayingZone)
     //{
     //    God.instance.zonePanelManager.FireFeedbackZonePanel( icon);
     //    // Here you got to fire up feedback in the zone too...
     //}
     AudioManager.instance.PlayAudioForIcon(icon);
     zoneViews.ForEach(zoneView =>
     {
         zoneView.FireFeedback(icon);
     });
 }
Exemple #4
0
 public void PlayAudioForIcon(ZoneFeedbackIcon.Icons icon)
 {
     if (icon == ZoneFeedbackIcon.Icons.SaleFine)
     {
         speaker.PlayOneShot(successfulSale);
     }
     else if (icon == ZoneFeedbackIcon.Icons.UpsellFail)
     {
         speaker.PlayOneShot(failedUpsell);
     }
     else if (icon == ZoneFeedbackIcon.Icons.UpsellFine)
     {
         speaker.PlayOneShot(successfulUpsell);
     }
     else if (icon == ZoneFeedbackIcon.Icons.DeathInQueue)
     {
         speaker.PlayOneShot(failedSale);
     }
 }
    public void RemoveCustomer(Customer processedCustomer, ZoneFeedbackIcon.Icons icon)
    {
        if (!this.enabled)
        {
            return;
        }
        foreach (Transform customerView in queue.transform)
        {
            if (customerView.name.Contains("Spot"))
            {
                continue;
            }
            if (customerView.GetComponent <CustomerView>().customerModel == processedCustomer)
            {
                GameObject feedbackIcon = Instantiate(God.instance.zoneFeedbackIconPrefab, customerView.transform.localPosition, Quaternion.identity) as GameObject;
                feedbackIcon.GetComponent <ZoneFeedbackIcon>().scale    = Vector3.one;
                feedbackIcon.GetComponent <ZoneFeedbackIcon>().zoneIcon = icon;
                feedbackIcon.GetComponent <UIPanel>().depth             = 50;
                feedbackIcon.GetComponent <UIPanel>().Refresh();
                feedbackIcon.SetParent(gameObject);
                feedbackIcon.transform.localPosition = transform.parent.InverseTransformPoint(customerView.transform.position);


                customerView.GetComponent <CustomerView>().DestroyCustomerView(
                    new System.Action(
                        () =>
                {
                    customerView.parent = null;
                    queue.Reposition();
                }
                        )
                    );
                return;
            }
        }
    }