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); } }
protected override void TableEnd() { foreach (var go in GOsUsed) { go.SetActive(false); } GOsUsed.Clear(); }
protected override void TableEnd() { animator.SetBool(cutID, false); foodps.Stop(); for (int i = 0; i < GOsUsed.Count; i++) { GOsUsed[i].SetActive(false); } GOsUsed.Clear(); }
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); }
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); } } }