Original Post
I am curious to know if AS currently supports polymorphism for host application registered types. For example, if I have a base type Entity, which represents a basic interactive entity in my world, and I subclass from that the type Npc. I can register Entity and Npc as seperate types to AS, and that works great, but what if I want to be able to simply pass a generic Entity in to a function, see if it's an Npc and "cast" it to the type Npc? For instance Is this currently possible in AngelScript?
void OnDamage(Entity @attacker, int amount)
{
Npc @npc = null;
if(attacker.GetType() == ET_NPC)
npc = entity;
else
return;
npc.DoDamage(amount / 2);
}