Files
heros/assets/script/game/skills/EndLineCom.ts
2025-01-10 16:50:18 +08:00

23 lines
557 B
TypeScript

import { _decorator, Component, Node } from 'cc';
import { SkillCom } from './SkillCom';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator;
@ccclass('EndLineCom')
export class EndLineCom extends Component {
base:SkillCom = null
start() {
this.base =this.node.getComponent(SkillCom)
}
update(deltaTime: number) {
if(smc.mission.pause) return
if(this.node.position.x > 500 || this.node.position.x<-500){
this.base.is_destroy = true
}
}
}