Esempio n. 1
0
    private void StorageFill()
    {
        ContainerManager containerManager = ContainerManager.SharedInstance;

        //get pickup container
        PickupIngredientContainer refillContainer = containerManager.RefillContainer;

        //Refill tempRefillInst;

        if (hasChe <= 0)
        {
            refillContainer.GetIngredientModelByType(IngredientType.Cheese).transform.position = cheSpawn.transform.position;
            //tempRefillInst = Instantiate(RefillTempPref);
            //tempRefillInst.IngredientType = IngredientType.Cheese;
            //tempRefillInst.transform.position = cheSpawn.transform.position;
        }
        if (hasLet <= 0)
        {
            refillContainer.GetIngredientModelByType(IngredientType.Lettuce).transform.position = letSpawn.transform.position;
            //tempRefillInst = Instantiate(RefillTempPref);
            //tempRefillInst.IngredientType = IngredientType.Lettuce;
            //tempRefillInst.transform.position = letSpawn.transform.position;
        }
        if (hasTom <= 0)
        {
            refillContainer.GetIngredientModelByType(IngredientType.Tomato).transform.position = tomSpawn.transform.position;
            //tempRefillInst = Instantiate(RefillTempPref);
            //tempRefillInst.IngredientType = IngredientType.Tomato;
            //tempRefillInst.transform.position = tomSpawn.transform.position;
        }
    }
Esempio n. 2
0
    private void StorageFill()
    {
        ContainerManager containerManager = ContainerManager.SharedInstance;

        //get pickup container
        PickupIngredientContainer refillContainer = containerManager.InfiniteContainer;

        //Refill tempRefillInst;

        if (hasChi <= 0)
        {
            refillContainer.GetIngredientModelByType(IngredientType.Chip).transform.position = chiSpawn.transform.position;
            //tempRefillInst = Instantiate(RefillTempPref);
            //tempRefillInst.IngredientType = IngredientType.Chip;
            //tempRefillInst.transform.position = chiSpawn.transform.position;
        }
        if (hasShe <= 0)
        {
            GameObject shell = refillContainer.GetIngredientModelByType(IngredientType.Shell);
            shell.transform.position = sheSpawn.transform.position;
            //shell.transform.localScale = new Vector3(40,40,40);
            //tempRefillInst = Instantiate(RefillTempPref);
            //tempRefillInst.IngredientType = IngredientType.Shell;
            //tempRefillInst.transform.position = sheSpawn.transform.position;
        }
    }
Esempio n. 3
0
    void OnTriggerEnter(Collider refillCollide)
    {
        if (refillCollide.CompareTag("Refill"))
        {
            ContainerManager containerManager = ContainerManager.SharedInstance;

            //get pickup container
            PickupIngredientContainer pickupContainer = containerManager.PickupIngredientContainer;

            //Debug.Log("refilled");

            //temp vars for ingreds
            //PhysicalIngredient IngredInst1;
            //PhysicalIngredient IngredInst2;
            //PhysicalIngredient IngredInst3;

            pickupContainer.GetIngredientModelByType(refillCollide.GetComponent <Refill>().IngredientType).transform.position = ingredSpawn1.transform.position;
            pickupContainer.GetIngredientModelByType(refillCollide.GetComponent <Refill>().IngredientType).transform.position = ingredSpawn2.transform.position;
            pickupContainer.GetIngredientModelByType(refillCollide.GetComponent <Refill>().IngredientType).transform.position = ingredSpawn3.transform.position;

            //create each ingredient
            //IngredInst1 = Instantiate(IngredTempPref);
            //IngredInst1.IngredientType = refillCollide.GetComponent<Refill>().IngredientType;
            //IngredInst1.transform.position = ingredSpawn1.transform.position;


            //IngredInst2 = Instantiate(IngredTempPref);
            //IngredInst2.IngredientType = refillCollide.GetComponent<Refill>().IngredientType;
            //IngredInst2.transform.position = ingredSpawn2.transform.position;

            //IngredInst3 = Instantiate(IngredTempPref);
            //IngredInst3.IngredientType = refillCollide.GetComponent<Refill>().IngredientType;
            //IngredInst3.transform.position = ingredSpawn3.transform.position;

            //kill refill
            toDelete = refillCollide.gameObject;
        }
    }