Basically, what I want to achieve is to have a Javascript class that defines properties of a Skill that a player can have. Then have a bunch of subclasses of Skill that add additional processing/effects. For instance, you may have a lightning attack skill that derives from Skill. I would like to have my Player game object have an array that contains a set of varying Skills that my code can call functions on. For instance, if Skill defines AttackTarget() then I would like to call that function on the derived skill subclass. So my Player’s can have a few different skills that do different things and yet my player controller doesn’t have to know any of the details, he can just access the skills array and tell the object in the array fire its effects.
Is this possible in Unity’s Javascript? If so, can someone point me in the right direction?
Thanks in advance