示例#1
0
 public void Eat()
 {
     movingStrategy.Move();
     animalListeners.ForEach(z =>
     {
         z.onEat(new AnimalEvent(this));
     });
 }
示例#2
0
 public void Move()
 {
     Console.WriteLine($"{this.name} has moved.");
     movingStrategy.Move();
 }
示例#3
0
 public void Move()
 {
     movingStrategy.Move();
 }