I feel like it should throw here because if this is called with an entity that doesn't implement the tile change interface something is seriously wrong with the calling code, however doing so is really hard for the calling code to manage and will stop all the event handlers in the chain from being called even if it's handled correctly above. source
private void EntityTileChanged(object sender, TileChangedArgs e)
{
IEntity entity = sender as IEntity;
if (entity == null)
{
// This situation should never happen!
return;
}
ExecuteSolvers(entity, e);
}
Ideas welcome.