技能layer改变,位置信息修改
This commit is contained in:
@@ -5,6 +5,8 @@ import { BoxSet } from "../common/config/BoxSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -35,6 +37,7 @@ export class SkillCom extends CCComp {
|
||||
in_time:number = 0.3; // 不动技能持续时间
|
||||
enemys:any = [];
|
||||
start() {
|
||||
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||
this.node.active=true
|
||||
let collider = this.getComponent(Collider2D);
|
||||
collider.group = this.box_group;
|
||||
@@ -73,7 +76,7 @@ export class SkillCom extends CCComp {
|
||||
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
if(smc.mission.pause) return
|
||||
this.toDestroy()
|
||||
|
||||
}
|
||||
@@ -82,6 +85,9 @@ export class SkillCom extends CCComp {
|
||||
this.ent.destroy()
|
||||
}
|
||||
}
|
||||
doDestroy(){
|
||||
this.is_destroy=true
|
||||
}
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.is_destroy=false
|
||||
|
||||
Reference in New Issue
Block a user