Exemple #1
0
        private void Eat(GameObject food)
        {
            IFood foodItem = food.GetComponent <IFood>();

            if (foodItem != null)
            {
                float calories = foodItem.GetEaten();
                RestoreEnergy(calories);
            }
        }