优化EntitySystem初始化逻辑/防止多次初始化
增加matcher和entitysystem的测试
This commit is contained in:
@@ -527,7 +527,9 @@ export class Entity {
|
||||
}
|
||||
|
||||
// 调用组件的生命周期方法
|
||||
component.onRemovedFromEntity();
|
||||
if (component.onRemovedFromEntity) {
|
||||
component.onRemovedFromEntity();
|
||||
}
|
||||
|
||||
// 发射组件移除事件
|
||||
if (Entity.eventBus) {
|
||||
|
||||
Reference in New Issue
Block a user