private void OnTriggerEnter(Collider otherCollider) { Cauldron cauldron = otherCollider.GetComponent <Cauldron>(); if (cauldron != null && cauldron.GetPotionType() != PotionType.NONE) { type = cauldron.GetPotionType(); cauldron.Reset(); Debug.Log("The cauldron is of type: " + cauldron.GetPotionType()); Debug.Log("This bottle is now of type " + type); switch (type) { case PotionType.GREEN: ChangeColor("greenMat"); break; case PotionType.BLUE: ChangeColor("blueMat"); break; case PotionType.RED: ChangeColor("redMat"); break; case PotionType.MISTAKE: ChangeColor("mistake"); break; default: ChangeColor("default"); break; } } }