private void InteractWithAllInteractablesInFrontOf(IAtlas atlas, ITilesetTable table)
{
List<GameActorPosition> tilesInFrontOf = GetInteractableTilesInFrontOf(atlas);
foreach (GameActorPosition tileInFrontOf in tilesInFrontOf)
{
if (tileInFrontOf != null)
{
var interactable = tileInFrontOf.Actor as IInteractableGameActor;
if (interactable != null)
{
interactable.ApplyGameAction(atlas, new Interact(this), tileInFrontOf.Position, table);
}
if (tileInFrontOf.Actor is Fruit)
{
EatFruit(tileInFrontOf);
}
}
}
}