Allow abstract component types to have typed ids

Michael Ludwig avatarMichael Ludwig created an issue

Make sure add() in Entity properly fails if an abstract type is passed in. Must update component and bulk component iterators to use the union of an abstract type's concrete types. This isn't too hard for single component queries, but bulk queries get trickier because what happens if an entity has multiple of the abstract type, which to select?

A solution for now will be to add a getSubtypes() method on EntitySystem that returns all TypedIds currently within the system that are subtypes of the input type.

Comments (3)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.