public override void Behavior() { base.Behavior(); if (this.AnimalsAround.Count != 0) { for (int i = 0; i < AnimalsAround.Count(); i++) { if (AnimalsAround[i].Texture == AnimalTexture.Rabbit) { ChangePosition(AnimalsAround[i].Position); if (this.Area.IntersectsWith(AnimalsAround[i].Area)) { AnimalsAround[i].Die(); } } } } }
public override void Behavior() { base.Behavior(); if (this.Hunger > 50) { if (this.AnimalsAround.Count != 0) { for (int i = 0; i < AnimalsAround.Count(); i++) { if (TargetAnimals.Contains(AnimalsAround[i].Texture)) { ChangePosition(AnimalsAround[i].Position); if (this.Area.IntersectsWith(AnimalsAround[i].Area)) { AnimalsAround[i].Die(); this.Hunger -= 50; } } } } } }