3

A component solution For convenience, not necessary for functionality, let us export an "archetype" variable: export(Array, GDScript) var archetype:Array It is an array of GDScript. You should be able to drag scripts from the file system panel to the items of this array in the inspector panel. As many as you want per Node. I could make it of ...


1

Those Archetypes are IEnumerable<TComponentKind>, where TComponentKind is what you use to identify components. You can, of course, do better than that. For example, they could be TComponentKind[], or HashSet<TComponentKind>. TComponentKind could be string, Type or even int (and you use bit flags to identify components, in which case the Archetype ...


1

I'd argue you should keep the implementation alongside the definition in this case. It gives you a lot of flexibility. But .. You don't want to be serialising methods, so your players/NPCs should have references to the above via an ID/Key when serialised. [assuming the hotkey is not user-configurable, it's fine there. If it is, that should live elsewhere as ...


Only top voted, non community-wiki answers of a minimum length are eligible