private void OnTriggerEnter(Collider other) { if (other.CompareTag("Ingredient") && _cauldron != null) { _cauldron.AddIngredient(other.GetComponent <Ingredient>()._type); Destroy(other.gameObject); } }
// Placer l'ingrédient dans le chaudron public bool PutIngredientIntoCauldron() { if (HasIngredient) { if (Cauldron.AddIngredient(m_ingredient)) { m_ingredient = null; return(true); } return(false); } Debug.LogWarning("RightHand: Could not put ingredient into cauldron (hand empty)"); return(false); }
// Verser le contenu du mortier dans le chaudron public bool PutMortarContentIntoCauldron() { if (HasMortar) { var ingredient = m_mortar.GetComponent <Mortar>().GetIngredient(); Debug.Assert(ingredient != null); Cauldron.AddIngredient(ingredient); Debug.Log("LeftHand: Mortar content put into the cauldron"); if (AutoReleaseMortar) { ReleaseMortar(); } return(true); } Debug.LogWarning("LeftHand: Could not put mortar content into the cauldron (mortar not held)"); return(false); }
public void Interact() { cauldron.AddIngredient(color); AudioManager.audioInstance.Audio.PlayOneShot(AudioManager.audioInstance.Clink); }
public override void PlacementTrigger(InteractiveObject ingredient) { cauldron.AddIngredient(ingredient); StartCoroutine(PlacementAnimation(ingredient)); }