public void AddIngredient(CollectibleType type) { if (type == CollectibleType.Flour && FloorNeed > 0) { FloorNeed -= 1; Hud.ChangeDoughNeed(type); StartCoroutine(playerController.Consume()); } if (type == CollectibleType.Water && WaterNeed > 0) { WaterNeed -= 1; Hud.ChangeDoughNeed(type); StartCoroutine(playerController.Consume()); } if (type == CollectibleType.Levain && LevainNeed > 0) { LevainNeed -= 1; Hud.ChangeDoughNeed(type); StartCoroutine(playerController.Consume()); } if (WaterNeed == 0 && FloorNeed == 0 && LevainNeed == 0) { Hud.ChangeDoughNeed(CollectibleType.Dough); } }