移除Core,新增各接口用于sdk扩展
This commit is contained in:
@@ -136,16 +136,15 @@ module es {
|
||||
public updateLists() {
|
||||
if (this._entitiesToRemove.getCount() > 0) {
|
||||
this._entitiesToRemove.toArray().forEach(entity => {
|
||||
// 处理标签列表
|
||||
this.removeFromTagList(entity);
|
||||
// 处理标签列表
|
||||
this.removeFromTagList(entity);
|
||||
|
||||
// 处理常规实体列表
|
||||
new linq.List(this._entities).remove(entity);
|
||||
entity.onRemovedFromScene();
|
||||
entity.scene = null;
|
||||
|
||||
if (Core.entitySystemsEnabled)
|
||||
this.scene.entityProcessors.onEntityRemoved(entity);
|
||||
// 处理常规实体列表
|
||||
new linq.List(this._entities).remove(entity);
|
||||
entity.onRemovedFromScene();
|
||||
entity.scene = null;
|
||||
|
||||
this.scene.entityProcessors.onEntityRemoved(entity);
|
||||
});
|
||||
this._entitiesToRemove.clear();
|
||||
}
|
||||
@@ -157,8 +156,7 @@ module es {
|
||||
|
||||
this.addToTagList(entity);
|
||||
|
||||
if (Core.entitySystemsEnabled)
|
||||
this.scene.entityProcessors.onEntityAdded(entity);
|
||||
this.scene.entityProcessors.onEntityAdded(entity);
|
||||
});
|
||||
|
||||
this._entitiesToAdded.toArray().forEach(entity => {
|
||||
@@ -177,7 +175,7 @@ module es {
|
||||
// 根据需要对标签列表进行排序
|
||||
if (this._unsortedTags.size > 0) {
|
||||
this._unsortedTags.forEach(value => this._entityDict.get(value).sort((a, b) => a.compareTo(b)));
|
||||
|
||||
|
||||
this._unsortedTags.clear();
|
||||
}
|
||||
}
|
||||
@@ -192,12 +190,12 @@ module es {
|
||||
return this._entities[i];
|
||||
}
|
||||
|
||||
for (let i = 0; i < this._entitiesToAdded.getCount(); i ++){
|
||||
for (let i = 0; i < this._entitiesToAdded.getCount(); i++) {
|
||||
let entity = this._entitiesToAdded.toArray()[i];
|
||||
if (entity.name == name)
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -229,7 +227,7 @@ module es {
|
||||
list.push(this._entities[i] as T);
|
||||
}
|
||||
|
||||
for (let i = 0; i < this._entitiesToAdded.getCount(); i ++){
|
||||
for (let i = 0; i < this._entitiesToAdded.getCount(); i++) {
|
||||
let entity = this._entitiesToAdded.toArray()[i];
|
||||
if (TypeUtils.getType(entity) instanceof type) {
|
||||
list.push(entity as T);
|
||||
|
||||
Reference in New Issue
Block a user