geotic
geotic copied to clipboard
remove components by type
Add ability to remove components by Class/Type:
entity.remove(Velocity);
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);
};
@mathias-belleau components must be removed by reference currently:
entity.move.destroy();
// alternate
entity.remove(entity.move);