示例#1
0
 public virtual void Eat(Leaf leaf, Meat meat)
 {
 }
示例#2
0
 //Metoden Eat(Leaf leaf). Körs om det finns blad kvar.
 override public void Eat(Leaf leaf)
 {
     HungerLevel = 0;
     leaf.Level--;
 }
示例#3
0
        //Viktors version av ovanstående. Satte även klassen animal till abstract.
        // public override string ToString()
        //{
        //     string str = Type + "en " + Name;
        //     return str;
        // }

        public virtual void Eat(Leaf food)
        {
        }