This commit is contained in:
pan
2024-08-20 18:27:34 +08:00
parent 87a445c225
commit b9edfd7001
17 changed files with 407 additions and 143 deletions

View File

@@ -22,16 +22,20 @@ export default class SkillLayer extends Component {
@property(Prefab)
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.doMonsterLoad, this);
oops.message.on("hero_load", this.doHeroLoad, this);
oops.message.on("do_use_skill", this.doSkill, this);
}
onMonsterLoaded(){
doSkill(){
// console.log("doSkill")
}
doMonsterLoad(){
// const light = instantiate(this.light);
// light.setPosition(300,-30,0);
// this.node.addChild(light);
}
onHeroLoaded(){
doHeroLoad(){
const light = instantiate(this.light);
light.setPosition(BoxSet.HERO_START,BoxSet.GAME_LINE,0);
this.node.addChild(light);

View File

@@ -1,23 +0,0 @@
import { _decorator, Component, Node, sp } from 'cc';
const { ccclass, property ,} = _decorator;
@ccclass('once')
export class once extends Component {
private spine!: sp.Skeleton;
start() {
}
protected onLoad(): void {
this.spine = this.getComponent(sp.Skeleton)!;
this.spine.setCompleteListener(trackEntry => {
this.node.destroy()
});
}
update(deltaTime: number) {
}
}

View File

@@ -1 +0,0 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"6e0a995d-16c1-4554-8f80-29394f24213b","files":[],"subMetas":{},"userData":{}}