dd
This commit is contained in:
@@ -22,22 +22,22 @@ export default class SkillLayer extends Component {
|
||||
light: Prefab = null;
|
||||
onLoad(){
|
||||
// 监听全局事件
|
||||
oops.message.on("monster_load", this.onMonsterLoaded, this);
|
||||
oops.message.on("hero_load", this.onHeroLoaded, this);
|
||||
// oops.message.on("monster_load", this.onMonsterLoaded, this);
|
||||
// oops.message.on("hero_load", this.onHeroLoaded, this);
|
||||
|
||||
}
|
||||
onMonsterLoaded(){
|
||||
const light = instantiate(this.light);
|
||||
light.setPosition(300,-30,0);
|
||||
this.node.addChild(light);
|
||||
// const light = instantiate(this.light);
|
||||
// light.setPosition(300,-30,0);
|
||||
// this.node.addChild(light);
|
||||
}
|
||||
onHeroLoaded(){
|
||||
const light = instantiate(this.light);
|
||||
light.setPosition(-300,-30,0);
|
||||
this.node.addChild(light);
|
||||
// const light = instantiate(this.light);
|
||||
// light.setPosition(-300,-30,0);
|
||||
// this.node.addChild(light);
|
||||
}
|
||||
update(dt: number) {
|
||||
this.timer.update(dt)
|
||||
// this.timer.update(dt)
|
||||
// if (this.timer.update(dt))
|
||||
// this.node.children.sort(this.zIndexSort);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user