This commit is contained in:
2024-08-14 22:55:17 +08:00
parent 0006a75db9
commit 36419ffda4
67 changed files with 6551 additions and 5435 deletions

View File

@@ -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);
}