新增renderableComponent 用于控制可渲染组件的基类 不要在transform当中直接更改目标属性
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
abstract class Component {
|
||||
public entity: Entity;
|
||||
public displayRender: egret.DisplayObject;
|
||||
private _enabled: boolean = true;
|
||||
public updateInterval: number = 1;
|
||||
|
||||
@@ -56,13 +55,6 @@ abstract class Component {
|
||||
|
||||
}
|
||||
|
||||
/** 绑定显示对象 */
|
||||
public bind(displayRender: egret.DisplayObject){
|
||||
this.displayRender = displayRender;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/** 内部使用 运行时不应该调用 */
|
||||
public registerComponent(){
|
||||
this.entity.componentBits.set(ComponentTypeManager.getIndexFor(this), false);
|
||||
|
||||
Reference in New Issue
Block a user