tgcom修复, todo 其他技能文件

This commit is contained in:
2025-01-06 13:30:58 +08:00
parent 125f0cb55e
commit a9a7f076f4
5 changed files with 17 additions and 14 deletions

View File

@@ -54,7 +54,7 @@ export class Skill extends ecs.Entity {
// node.setScale(v3(node.scale.x*scale,node.scale.y))
sv.speed=SkillSet[uuid].speed;
sv.in_time=SkillSet[uuid].in;
if(group==BoxSet.MONSTER) t_pos.x=-1*t_pos.x
// if(group==BoxSet.MONSTER) t_pos.x=-1*t_pos.x
sv.t_pos = t_pos; // 目标增量
sv.type = SkillSet[uuid].type;
sv.box_tag= BoxSet.SKILL_TAG;

View File

@@ -1,5 +1,6 @@
import { _decorator, Component, Node, v3 } from 'cc';
import { SkillCom } from './SkillCom';
import { BoxSet } from '../common/config/BoxSet';
const { ccclass, property } = _decorator;
@ccclass('TgCom')
@@ -9,6 +10,9 @@ 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)
}