예제 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Ingredient") && _cauldron != null)
     {
         _cauldron.AddIngredient(other.GetComponent <Ingredient>()._type);
         Destroy(other.gameObject);
     }
 }
예제 #2
0
    // 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);
    }
예제 #3
0
    // 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);
    }
예제 #4
0
 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));
 }