private EatFruit ( GameActorPosition applePosition ) : void | ||
applePosition | GameActorPosition | |
return | void |
private void EatFruit(GameActorPosition applePosition)
{
var fruit = applePosition.Actor as Fruit;
if (fruit is IEatable)
{
Energy += ENERGY_FOR_EATING_FRUIT;
}
}