mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Update entity_manager.js
Fixed the error on line 126. Was: ` const componentId = /** @type {typeof Component} */ (component.constructor).getId();` Is: ` const componentId = component.getId();` In the function component should be a type of component and not an instance.
This commit is contained in:
parent
b41a0ca1cb
commit
36fb4def36
@ -123,7 +123,7 @@ export class EntityManager extends BasicSerializableObject {
|
||||
*/
|
||||
removeDynamicComponent(entity, component) {
|
||||
entity.removeComponent(component, true);
|
||||
const componentId = /** @type {typeof Component} */ (component.constructor).getId();
|
||||
const componentId = component.getId();
|
||||
|
||||
fastArrayDeleteValue(this.componentToEntity[componentId], entity);
|
||||
this.root.signals.entityComponentRemoved.dispatch(entity);
|
||||
|
Loading…
Reference in New Issue
Block a user