技能layer改变,位置信息修改

This commit is contained in:
2025-01-07 07:54:29 +08:00
parent a9a7f076f4
commit ca5adce589
16 changed files with 75 additions and 536 deletions

View File

@@ -1,6 +1,7 @@
import { _decorator, Component, Node, v3 } from 'cc';
import { SkillCom } from './SkillCom';
import { BoxSet } from '../common/config/BoxSet';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator;
@ccclass('TgCom')
@@ -10,13 +11,11 @@ export class TgCom extends Component {
base:SkillCom = null
start() {
this.base =this.node.getComponent(SkillCom)
if(this.base.box_group==BoxSet.MONSTER){
this.base.t_pos.x=-1*this.base.t_pos.x
}
this.node.setPosition(this.base.t_pos)
}
update(deltaTime: number) {
if(smc.mission.pause) return
this.cd+=deltaTime
if(this.cd>=1){
// this.node.setPosition(v3(-1000,0,0))