Beispiel #1
0
 private void OnInteract(int treeIndex)
 {
     if (treeIndex == 0)
     {
         ollie = CustomerManager.instance.GetRecurringCustomer(0);
         StartDialog();
     }
 }
 protected override void Start()
 {
     popUpPrefab   = (GameObject)Resources.Load("DialogPopUp");
     popUpInstance = Instantiate(popUpPrefab, popUpPos.position, popUpPos.rotation, transform);
     popUpInstance.SetActive(false);
     popUpAnimator     = popUpInstance.GetComponentInChildren <Animator>();
     Locked            = true;
     recurringCustomer = GetComponent <RecurringCustomer>();
 }
Beispiel #3
0
    private void Start()
    {
        GameObject laundromatBasketPrefab = (GameObject)Resources.Load("LaundromatBasket");

        RecurringCustomer customer = CustomerManager.instance.GetRecurringCustomer(characterIndex);
        Garment           bone     = new OllieFemur();

        Basket basket = LaundryManager.GetRandomBasket();

        while (!basket.AddGarment(bone))
        {
            //If there is no space in the basket for the bone, remove something
            Garment removed = basket.RemoveTopGarment();
            //If the removed garment is a sock, remove its match
            if (removed is GarmentSock)
            {
                foreach (Garment garment in basket.contents)
                {
                    if (garment is GarmentSock)
                    {
                        if (garment.color.Equals(removed.color) && garment.fabric.Equals(removed.fabric))
                        {
                            basket.RemoveGarment(garment);
                            break;
                        }
                    }
                }
            }
        }

        List <Garment> olliesGarments = new List <Garment>();

        foreach (Garment garment in basket.contents)
        {
            garment.customerID = customerID;
            olliesGarments.Add(garment);
        }

        customer.basket   = basket;
        customer.garments = olliesGarments;
    }