does "typeof" include the types that are inherting clickable?
No, it doesn't. ClickableEntity
and Clickable
are two different types, so they are different keys in the dictionary.
Instead of a dictionary, you could just use a single List<Entity>
, and filter it using OfType
:
protected List<Entity> entities;
foreach (var c in entities.OfType<Clickable>())
{
... Perform click
}