SebLague / Ecosystem-2

527 stars 162 forks source link

Foxes not supported? #5

Open ericwerk opened 5 years ago

ericwerk commented 5 years ago

In Animal.cs, in line 202, you cast the foodtarget to a Plant: eatAmount = ((Plant) foodTarget).Consume (eatAmount);

This fails when the foodTarget is a Rabbit :-) What did you do in the other code, just remove the eaten Rabbit?

ericwerk commented 5 years ago

Plants, when eaten, grow smaller until there is no more left, then they die. Should Rabbits, when "eaten" grow weaker? Cry for help? I'd love to implement a fight mode and courage for animals, and have them have the choice to come to the aid of attacked friends, if they are courageous enough.

mnemanja commented 5 years ago

Hi @ericwerk, that sounds very interesting.

I would like to suggest changing the title of the issue to something more related to the content of the issue. Like this it has little to do with the support for foxes.

Sorry for not being more helpful.