Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove components by type #36

Open
ddmills opened this issue Feb 14, 2021 · 2 comments
Open

remove components by type #36

ddmills opened this issue Feb 14, 2021 · 2 comments

Comments

@ddmills
Copy link
Owner

ddmills commented Feb 14, 2021

Add ability to remove components by Class/Type:

entity.remove(Velocity);
@mathias-belleau
Copy link

Getting an error on some components when trying to remove

entity.remove(Move);

Uncaught TypeError: can't convert BigInt to number

seems to be on

var subtractBit = function subtractBit(num, bit) {
  return num & ~(1n << bit);
};

@ddmills
Copy link
Owner Author

ddmills commented Feb 28, 2021

@mathias-belleau components must be removed by reference currently:

entity.move.destroy();

// alternate
entity.remove(entity.move);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants