Пример #1
0
    public override void AssignTable(Chef chef, ActionDictionaries.Action action)
    {
        base.AssignTable(chef, action);

        foreach (var ing in action.Consumes)
        {
            for (int i = 0; i < ing.Value; i++)
            {
                string     modelStr = ActionDictionaries.Ingredients[ing.Key];
                GameObject go       = ModelSpawner.GetIngredientModel(chef.ID, modelStr);
                Transform  goTrans  = go.GetComponent <Transform>();
                goTrans.position = foodLoc.position;
                go.SetActive(true);
                GOsUsed.Add(go);
            }
        }
        int index = 0;

        foreach (var tool in action.Requires)
        {
            string     modelStr = ActionDictionaries.Ingredients[tool];
            GameObject go       = ModelSpawner.GetIngredientModel(chef.ID, modelStr);
            go.GetComponent <Transform>().position = reqLocs[index].position;
            go.SetActive(true);
            GOsUsed.Add(go);
        }
    }
Пример #2
0
 protected override void TableEnd()
 {
     foreach (var go in GOsUsed)
     {
         go.SetActive(false);
     }
     GOsUsed.Clear();
 }
Пример #3
0
 protected override void TableEnd()
 {
     animator.SetBool(cutID, false);
     foodps.Stop();
     for (int i = 0; i < GOsUsed.Count; i++)
     {
         GOsUsed[i].SetActive(false);
     }
     GOsUsed.Clear();
 }
Пример #4
0
 protected override void TableEnd()
 {
     ps.Stop();
     stoveLight.enabled = false;
     cookingPotLarge.SetActive(false);
     for (int i = 0; i < GOsUsed.Count; i++)
     {
         GOsUsed[i].SetActive(false);
     }
     GOsUsed.Clear();
     cookingPotLarge.SetActive(false);
     cookingPot2Small.SetActive(false);
 }
Пример #5
0
    public override void AssignTable(Chef chef, ActionDictionaries.Action action)
    {
        base.AssignTable(chef, action);

        foreach (var ing in action.Consumes)
        {
            for (int i = 0; i < ing.Value; i++)
            {
                string     modelStr = ActionDictionaries.Ingredients[ing.Key];
                GameObject go       = ModelSpawner.GetIngredientModel(chef.ID, modelStr);
                Transform  goTrans  = go.GetComponent <Transform>();
                Vector2    randPos  = Random.insideUnitCircle * 0.4f;
                goTrans.position = foodLoc.position + new Vector3(randPos.x, 0, randPos.y);
                go.SetActive(true);
                GOsUsed.Add(go);
            }
        }
    }