private void Drink(GameObject consumable) { IConsumable water = consumable.GetComponent <IConsumable>(); if (water != null) { float waterDrunk = water.GetConsumed(); Rehydrate(waterDrunk); } }