Пример #1
0
        public override void Eat(AbstractCharacter character)
        {
            Grass grass = (Grass)character;

            life += grass.GetLife() / 2;
        }
Пример #2
0
        public override void Eat(AbstractCharacter character)
        {
            Sheep sheep = (Sheep)character;

            life += sheep.GetLife() / 2;
        }
Пример #3
0
 public override void Eat(AbstractCharacter character)
 {
     Console.WriteLine("Grass can't eat");
 }
Пример #4
0
 abstract public void Eat(AbstractCharacter character);