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

@@ -20,7 +20,7 @@ export const MissionSet = [
export const Missions = [
[5201,5201,5202,5203,5204,5205,5206,5207,5208,5209,5210,5211,5212],
[5213,5213,5214,5215],
[5015,5015],
[5015,],
]

View File

@@ -317,10 +317,10 @@ export class HeroViewComp extends CCComp {
get_enemy_pos(){
let t_pos:Vec3 = v3(720,0)
if(this.enemy){
t_pos = v3(this.enemy.x-this.node.position.x,this.enemy.y-this.node.position.y)
console.log(this.hero_name+":"+this.uuid+"enemy ="+this.enemy.x+" x"+this.node.position.x+" t_pos"+t_pos);
}
console.log(this.hero_name+":"+this.uuid+"enemy ="+this.enemy.x+" x"+this.node.position.x+" t_pos"+t_pos);
return t_pos
}
get_hero_pos(hero:any){
@@ -410,7 +410,6 @@ export class HeroViewComp extends CCComp {
if(this.pw >= this.pwm){
this.pw = 0
this.BUFFCOMP.max_show()
this.do_skill(this.sk2)
return true
}else{

View File

@@ -257,19 +257,19 @@ export class MissionComp extends CCComp {
let yc=2
let bc=1
for(let i=0;i<tc;i++){
let x=RandomManager.instance.getRandomInt(0,t_num)
this.addMonster(Missions[0][x],i)
console.log("Missions:",Missions[0][x])
let x=RandomManager.instance.getRandomInt(1,t_num,3)
this.addMonster(Missions[0][x-1],i)
console.log("Missions:"+x,Missions[0][x-1])
}
for(let i=0;i<yc;i++){
let x=RandomManager.instance.getRandomInt(0,y_num)
this.addMonster(Missions[1][x],i)
console.log("Missions:",Missions[1][x])
let x=RandomManager.instance.getRandomInt(1,y_num,3)
this.addMonster(Missions[1][x-1],i)
console.log("Missions:"+x,Missions[1][x-1])
}
for(let i=0;i<bc;i++){
let x=RandomManager.instance.getRandomInt(0,b_num,2)
this.addMonster(Missions[2][x],i)
console.log("Missions:",Missions[2][x])
let x=RandomManager.instance.getRandomInt(1,b_num,3)
this.addMonster(Missions[2][x-1],i)
console.log("Missions:"+x,Missions[2][x-1],)
}
}
heros_call(){

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)
}