From 331effddaa614fb1593b91c6515100eb6d5b9987 Mon Sep 17 00:00:00 2001 From: walkpan Date: Sat, 25 Oct 2025 15:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=20skills=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E6=97=A0=E6=95=88=E6=96=87=E4=BB=B6,=E6=9C=89=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=BF=81=E7=A7=BB=E5=88=B0skill=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/game/BezierMove/BezierMove.ts | 5 +- assets/script/game/hero/BuffComp.ts | 6 +- assets/script/game/map/MissionComp.ts | 6 +- assets/script/game/skill/SkillViewCom.ts | 2 +- .../script/game/{skills => skill}/Tooltip.ts | 0 .../game/{skills => skill}/Tooltip.ts.meta | 0 .../game/{skills => skill}/TooltipCom.ts | 0 .../game/{skills => skill}/TooltipCom.ts.meta | 0 .../script/game/{skills => skill}/oncend.ts | 0 .../game/{skills => skill}/oncend.ts.meta | 0 .../script/game/{skills => skill}/timedCom.ts | 0 .../game/{skills => skill}/timedCom.ts.meta | 0 assets/script/game/skills.meta | 2 +- assets/script/game/skills/AnmEndCom.ts | 21 -- assets/script/game/skills/AnmEndCom.ts.meta | 9 - assets/script/game/skills/Skill.ts | 90 ------ assets/script/game/skills/Skill.ts.meta | 9 - assets/script/game/skills/SkillCom.ts | 274 ------------------ assets/script/game/skills/SkillCom.ts.meta | 9 - assets/script/game/skills/atked.ts | 20 -- assets/script/game/skills/atked.ts.meta | 9 - assets/script/game/skills/com.meta | 9 - assets/script/game/skills/com/AtkCom.ts | 34 --- assets/script/game/skills/com/AtkCom.ts.meta | 9 - assets/script/game/skills/debuff.ts | 33 --- assets/script/game/skills/debuff.ts.meta | 9 - assets/script/game/skills/once.ts | 18 -- assets/script/game/skills/once.ts.meta | 9 - 28 files changed, 10 insertions(+), 573 deletions(-) rename assets/script/game/{skills => skill}/Tooltip.ts (100%) rename assets/script/game/{skills => skill}/Tooltip.ts.meta (100%) rename assets/script/game/{skills => skill}/TooltipCom.ts (100%) rename assets/script/game/{skills => skill}/TooltipCom.ts.meta (100%) rename assets/script/game/{skills => skill}/oncend.ts (100%) rename assets/script/game/{skills => skill}/oncend.ts.meta (100%) rename assets/script/game/{skills => skill}/timedCom.ts (100%) rename assets/script/game/{skills => skill}/timedCom.ts.meta (100%) delete mode 100644 assets/script/game/skills/AnmEndCom.ts delete mode 100644 assets/script/game/skills/AnmEndCom.ts.meta delete mode 100644 assets/script/game/skills/Skill.ts delete mode 100644 assets/script/game/skills/Skill.ts.meta delete mode 100644 assets/script/game/skills/SkillCom.ts delete mode 100644 assets/script/game/skills/SkillCom.ts.meta delete mode 100644 assets/script/game/skills/atked.ts delete mode 100644 assets/script/game/skills/atked.ts.meta delete mode 100644 assets/script/game/skills/com.meta delete mode 100644 assets/script/game/skills/com/AtkCom.ts delete mode 100644 assets/script/game/skills/com/AtkCom.ts.meta delete mode 100644 assets/script/game/skills/debuff.ts delete mode 100644 assets/script/game/skills/debuff.ts.meta delete mode 100644 assets/script/game/skills/once.ts delete mode 100644 assets/script/game/skills/once.ts.meta diff --git a/assets/script/game/BezierMove/BezierMove.ts b/assets/script/game/BezierMove/BezierMove.ts index 5eeca3ea..5ea5ea32 100644 --- a/assets/script/game/BezierMove/BezierMove.ts +++ b/assets/script/game/BezierMove/BezierMove.ts @@ -1,5 +1,4 @@ import { _decorator, Component, Node, view, UITransform, Vec3, math, EventHandler, Graphics, Color, TweenEasing, Enum } from 'cc'; -import { SkillCom } from '../skills/SkillCom'; import { smc } from '../common/SingletonModuleComp'; import { AtkConCom } from '../skill/AtkConCom'; const { ccclass, property } = _decorator; @@ -155,9 +154,9 @@ export class BezierMove extends Component { this._isMoving = false; // 触发移动完成事件 // console.log("onMoveComplete") - let scom=this.node.getComponent(SkillCom) + let acom=this.node.getComponent(AtkConCom) - let skill=scom?scom:acom + let skill=acom if(skill){ skill.doDestroy() } diff --git a/assets/script/game/hero/BuffComp.ts b/assets/script/game/hero/BuffComp.ts index d3871eae..075cfddb 100644 --- a/assets/script/game/hero/BuffComp.ts +++ b/assets/script/game/hero/BuffComp.ts @@ -1,11 +1,9 @@ import { _decorator, Component, instantiate, Label, Node, Prefab, ProgressBar, tween, UITransform, v3, Vec3 } from 'cc'; import { oops } from 'db://oops-framework/core/Oops'; import { ecs } from 'db://oops-framework/libs/ecs/ECS'; -import { Tooltip } from '../skills/Tooltip'; -import { timedCom } from '../skills/timedCom'; +import { Tooltip } from '../skill/Tooltip'; +import { timedCom } from '../skill/timedCom'; import { smc } from '../common/SingletonModuleComp'; -import { HeroViewComp } from './HeroViewComp'; -import { GameEvent } from '../common/config/GameEvent'; import { Timer } from 'db://oops-framework/core/common/timer/Timer'; const { ccclass, property } = _decorator; diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 3de08f72..17fa4c80 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -6,8 +6,9 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O import { FightSet} from "../common/config/Mission"; import { GameEvent } from "../common/config/GameEvent"; import { HeroViewComp } from "../hero/HeroViewComp"; -import { SkillCom } from "../skills/SkillCom"; import { UIID } from "../common/config/GameUIConfig"; +import { AtkConCom } from "../skill/AtkConCom"; +import { SkillViewCom } from "../skill/SkillViewCom"; const { ccclass, property } = _decorator; @@ -136,7 +137,8 @@ export class MissionComp extends CCComp { private cleanComponents() { ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()}); - ecs.query(ecs.allOf(SkillCom)).forEach(entity => {entity.remove(SkillCom);entity.destroy()}); + ecs.query(ecs.allOf(AtkConCom)).forEach(entity => {entity.remove(AtkConCom);entity.destroy()}); + ecs.query(ecs.allOf(SkillViewCom)).forEach(entity => {entity.remove(SkillViewCom);entity.destroy()}); } diff --git a/assets/script/game/skill/SkillViewCom.ts b/assets/script/game/skill/SkillViewCom.ts index 7f4d49c5..5a889b0f 100644 --- a/assets/script/game/skill/SkillViewCom.ts +++ b/assets/script/game/skill/SkillViewCom.ts @@ -2,7 +2,7 @@ import { _decorator, CCBoolean, CCFloat, CCInteger, instantiate, Node, Prefab, v import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { HeroViewComp } from "../hero/HeroViewComp"; -import { getAttrs, RType, SkillSet } from "../common/config/SkillSet"; +import { RType, SkillSet } from "../common/config/SkillSet"; import { AtkConCom } from "./AtkConCom"; import { BoxSet } from "../common/config/BoxSet"; diff --git a/assets/script/game/skills/Tooltip.ts b/assets/script/game/skill/Tooltip.ts similarity index 100% rename from assets/script/game/skills/Tooltip.ts rename to assets/script/game/skill/Tooltip.ts diff --git a/assets/script/game/skills/Tooltip.ts.meta b/assets/script/game/skill/Tooltip.ts.meta similarity index 100% rename from assets/script/game/skills/Tooltip.ts.meta rename to assets/script/game/skill/Tooltip.ts.meta diff --git a/assets/script/game/skills/TooltipCom.ts b/assets/script/game/skill/TooltipCom.ts similarity index 100% rename from assets/script/game/skills/TooltipCom.ts rename to assets/script/game/skill/TooltipCom.ts diff --git a/assets/script/game/skills/TooltipCom.ts.meta b/assets/script/game/skill/TooltipCom.ts.meta similarity index 100% rename from assets/script/game/skills/TooltipCom.ts.meta rename to assets/script/game/skill/TooltipCom.ts.meta diff --git a/assets/script/game/skills/oncend.ts b/assets/script/game/skill/oncend.ts similarity index 100% rename from assets/script/game/skills/oncend.ts rename to assets/script/game/skill/oncend.ts diff --git a/assets/script/game/skills/oncend.ts.meta b/assets/script/game/skill/oncend.ts.meta similarity index 100% rename from assets/script/game/skills/oncend.ts.meta rename to assets/script/game/skill/oncend.ts.meta diff --git a/assets/script/game/skills/timedCom.ts b/assets/script/game/skill/timedCom.ts similarity index 100% rename from assets/script/game/skills/timedCom.ts rename to assets/script/game/skill/timedCom.ts diff --git a/assets/script/game/skills/timedCom.ts.meta b/assets/script/game/skill/timedCom.ts.meta similarity index 100% rename from assets/script/game/skills/timedCom.ts.meta rename to assets/script/game/skill/timedCom.ts.meta diff --git a/assets/script/game/skills.meta b/assets/script/game/skills.meta index b4f9ba49..3153047c 100644 --- a/assets/script/game/skills.meta +++ b/assets/script/game/skills.meta @@ -2,7 +2,7 @@ "ver": "1.2.0", "importer": "directory", "imported": true, - "uuid": "144b4336-ce17-4dba-85ac-61361f404838", + "uuid": "46a59ed4-e4fc-48ef-9afe-fcd7a47e6665", "files": [], "subMetas": {}, "userData": {} diff --git a/assets/script/game/skills/AnmEndCom.ts b/assets/script/game/skills/AnmEndCom.ts deleted file mode 100644 index b55e494f..00000000 --- a/assets/script/game/skills/AnmEndCom.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { _decorator, Animation, Component, Node } from 'cc'; -const { ccclass, property } = _decorator; - -@ccclass('AnmEndCom') -export class AnmEndCom extends Component { - start() { - - if(this.node.getComponent(Animation)){ - let anim = this.node.getComponent(Animation); - // console.log("has anim",anim) - anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this); - } - - - } - onAnimationFinished(){ - this.node.destroy() - } -} - - diff --git a/assets/script/game/skills/AnmEndCom.ts.meta b/assets/script/game/skills/AnmEndCom.ts.meta deleted file mode 100644 index 22e3f3a9..00000000 --- a/assets/script/game/skills/AnmEndCom.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "9a6c0cbd-2b5b-4ecd-85d3-c017de7a5b2a", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/Skill.ts b/assets/script/game/skills/Skill.ts deleted file mode 100644 index 09200194..00000000 --- a/assets/script/game/skills/Skill.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; -import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { BoxSet, FacSet } from "../common/config/BoxSet"; -import { HType } from "../common/config/heroSet"; -import {Attrs, SkillSet } from "../common/config/SkillSet"; -import { smc } from "../common/SingletonModuleComp"; -import { HeroViewComp } from "../hero/HeroViewComp"; -import { SkillCom } from "./SkillCom"; -import { instantiate, Node, Prefab, Vec3 ,tween, v3,animation,Label,resources,SpriteFrame,Sprite} from "cc"; - -/** Skill 模块 */ -@ecs.register(`Skill`) -export class Skill extends ecs.Entity { - SkillView!: SkillCom; - /** 实始添加的数据层组件 */ - protected init() { - - } - /** 模块资源释放 */ - destroy() { - // 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放 - this.remove(SkillCom); - super.destroy(); - } - load( - startPos: Vec3, // 起始位置 - parent: Node, // 父节点 - uuid: number, // 技能ID - targetPos: Vec3, // 目标位置 - caster:any=null, // 施法者 - angle:number=0, - dmg:number=0 - ) { - - const config = SkillSet[uuid]; - if (!config) { - console.error("[Skill] 技能配置不存在:", uuid); - return; - } - - // 检查施法者 - if (!caster) { - console.error("[Skill] 施法者为空"); - return; - } - - // 加载预制体 - const path = `game/skill/atk/${config.sp_name}`; - const prefab:Prefab = oops.res.get(path, Prefab); - if (!prefab) { - console.error("[Skill] 预制体加载失败:", path); - return; - } - if(uuid==6001){ - console.log("load skill startPos",startPos) - } - const node = instantiate(prefab); - var scene = smc.map.MapView.scene; - // 设置节点属性 - node.parent = parent; - node.setPosition(startPos); - if(caster.fac==FacSet.MON){ - node.scale=v3(node.scale.x*-1,1,1) - }else{ - if(caster.type==HType.warrior){ - if(caster.node.scale.x<0){ - node.scale=v3(node.scale.x*-1,node.scale.y,1) - } - } - } - node.angle+=angle - // 添加技能组件 - const SComp = node.getComponent(SkillCom); // 初始化技能参数 - - // 只设置必要的运行时属性,配置信息通过 SkillSet[uuid] 访问 - Object.assign(SComp, { - // 核心标识 - s_uuid: uuid, - // 位置和施法者信息 - startPos: startPos, - targetPos: targetPos, - group: caster.box_group, - fac: caster.fac, - // 技能数值 - - }); - - this.add(SComp); - } -} diff --git a/assets/script/game/skills/Skill.ts.meta b/assets/script/game/skills/Skill.ts.meta deleted file mode 100644 index bae769b0..00000000 --- a/assets/script/game/skills/Skill.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "e7bac796-7cc3-47b4-904b-85a95cc15390", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts deleted file mode 100644 index 3ac547d7..00000000 --- a/assets/script/game/skills/SkillCom.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, math, RigidBody2D, Animation, Tween} from "cc"; -import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; -import { smc } from "../common/SingletonModuleComp"; -import { GameEvent } from "../common/config/GameEvent"; -import { Attrs, DTType, EType, SkillSet, SType, TGroup } from "../common/config/SkillSet"; -import { BoxSet, FacSet } from "../common/config/BoxSet"; -import { HeroViewComp } from "../hero/HeroViewComp"; -import { BezierMove } from "../BezierMove/BezierMove"; - - -const { ccclass, property } = _decorator; - -/** 视图层对象 */ -@ccclass('SkillCom') -@ecs.register('SkillCom') -export class SkillCom extends CCComp { - // 核心标识和配置 - s_uuid:number = 0; - // 运行时状态(必须缓存的) - is_destroy:boolean = false; - startPos: Vec3 = v3(); // 起始位置 - targetPos: Vec3 = v3(); // 目标位置 - group:number = 0; //阵营 - fac:number=0; //阵营 - caster:any=null; - - // 战斗相关运行时数据 - ap:number=0; - burn_count:number=0; - burn_value:number=0; - stun_time:number=0; - stun_ratio:number=0; - frost_ratio:number=0; - frost_time:number=0; - run_time:number=0; - hited_time:number=0; - hit_count:number=0; - caster_crit:number=0; - caster_crit_d:number=0; - puncture:number=0; - puncture_damage:number=0; - debuff_up:number=0; - debuff_value:number=0; - debuff_count:number=0; - // 组件引用 - anim:Animation=null; - tweenInstance:Tween = null; - private moveDirection: Vec3 | null = null; // 添加一个属性来存储移动方向 - - // 缓存的配置对象(避免重复查找) - public skillConfig: any = null; - private isInitialized: boolean = false; - - protected onLoad(): void { - - } - - - private initializeSkillConfig() { - if (this.isInitialized) return; - - // 缓存技能配置,避免重复查找 - this.skillConfig = SkillSet[this.s_uuid]; - if (!this.skillConfig) { - // console.error("[SkillCom] 技能配置不存在:", this.s_uuid); - return; - } - - this.isInitialized = true; - // console.log("[SkillCom] 技能配置初始化完成:", this.s_uuid, this.skillConfig.name); - } - - start() { - this.initializeSkillConfig(); - if (!this.skillConfig) return; - this.node.setPosition(this.startPos.x,this.startPos.y,0) - this.anim=this.node.getComponent(Animation) - this.on(GameEvent.MissionEnd, this.doDestroy, this); - this.node.active = true; - let collider = this.getComponent(Collider2D); - if(collider) { - collider.group = this.group; - collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this); - } - let bm=this.node.getComponent(BezierMove) - // //console.log(this.group +"技能 collider ",collider); - // switch(this.skillConfig.AType){ - // case AType.parabolic: - // this.node.angle +=10 - // // bm.speed=700 - // if(this.group==BoxSet.MONSTER) {bm.controlPointSide=-1 } - // bm.rotationSmoothness=0.6 - // bm.moveTo(this.targetPos) - // break; - // case AType.linear: - // let s_x=this.startPos.x - // let s_y=this.startPos.y - // let t_x=this.targetPos.x - // let t_y=this.targetPos.y - // // 设定目标x - // this.targetPos.x = 400; - // if(this.group == BoxSet.MONSTER) { - // bm.controlPointSide = -1; - // this.targetPos.x = -400; - // } - // // 计算斜率 - // const k = (t_y - s_y) / (t_x - s_x); - // // 按直线公式计算新的y - // this.targetPos.y = k * (this.targetPos.x - s_x) + s_y; - // bm.controlPointOffset=0 - // bm.rotationSmoothness=0.6 - // bm.moveTo(this.targetPos); - // break; - // case AType.StartEnd: - // // 2段位移:先升高,然后移到目的地 - // this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,0,0) - // this.do_anim() - // break; - // case AType.fixedEnd: - // this.node.setPosition(this.targetPos.x > 360?300:this.targetPos.x,0,0) - // this.do_anim() - // break; - // case AType.fixedStart: // - // if(this.s_uuid==6001){ - // console.log("skillcom startPos",this.startPos) - // } - // this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,0,0) - // this.do_anim() - // break; - // } - - - } - do_anim(){ - if(this.node.getComponent(Animation)){ - let anim = this.node.getComponent(Animation); - //console.log("[SkillCom]:has anim",anim) - anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this); - } - - } - onAnimationFinished(){ - // console.log("[SkillCom]:onAnimationFinished",this.s_uuid) - if (!this.skillConfig) return; - - if(this.skillConfig.EType==EType.timeEnd) return - if(this.skillConfig.SType!=SType.damage){ - this.to_do_buff() - } - - this.is_destroy=true - } - to_do_buff(){ - if (!this.skillConfig) return; - - switch(this.skillConfig.SType){ - case SType.shield: - this.caster.add_shield(this.caster[Attrs.HP_MAX]*(100+this.skillConfig.buV/100)) - break; - } - } - //单体伤害 - single_damage(target:HeroViewComp,is_range:boolean=false){ - // //console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit) - // if(this.hit_count > 0&&!is_range) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半,过滤范围伤害 - if(target == null) return; - if (!this.skillConfig) return; - let ap=this.ap - if(this.hit_count > 0 &&!is_range ){ - ap=ap*(50+this.puncture_damage)/100 - } - // target.do_atked(ap,this.caster_crit,this.caster_crit_d, - // this.burn_count,this.burn_value, - // this.stun_time,this.stun_ratio, - // this.frost_time,this.frost_ratio, - // this.skillConfig.AtkedName - // ) // ap 及暴击 属性已经在skill.ts 处理 - // console.log("[SkillCom]:single_damage t:tp:rtp",this.node.position,this.targetPos,target.node.position) - if(this.skillConfig.debuff>0){ - let debuff=this.skillConfig - let dev=debuff.deV*(100+this.debuff_value)/100 - let deR=debuff.deR+this.debuff_up - dev=Math.round(dev*100)/100 - let deC=debuff.deC+this.debuff_count //dec只作为次数叠加 - // //console.log("[SkillCom]:debuff",this.skillConfig.name,debuff.debuff,deUP.deV,deUP.deC) - target.addDebuff(debuff.debuff) - } - this.hit_count++ - // console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,this.skillConfig.hit,this.puncture) - if(this.hit_count>=(this.skillConfig.hit+this.puncture)&&(this.skillConfig.DTType!=DTType.range)&&(this.skillConfig.EType!=EType.animationEnd)&&(this.skillConfig.EType!=EType.timeEnd)) this.is_destroy=true // 技能命中次数 - } - - onBeginContact (seCol: Collider2D, oCol: Collider2D) { - // console.log(this.scale+"碰撞开始 ",seCol,oCol); - if(seCol.node.position.x-oCol.node.position.x > 100 ) return - let target = oCol.getComponent(HeroViewComp) - if(oCol.group!=this.group){ - if(target == null) return; - if (!this.skillConfig) return; - // console.log("[SkillCom]:onBeginContact oCol||seCol",oCol.node.position,seCol.node.position) - this.single_damage(target,this.skillConfig.DTType==DTType.range?true:false) - // this.ent.destroy() - } - } - - - - update(deltaTime: number) { - // 确保配置已初始化(处理 update 可能先于 start 执行的情况) - if (!this.isInitialized) { - this.initializeSkillConfig(); - if (!this.skillConfig) return; - } - - if(smc.mission.pause) { - if(this.anim) this.anim.pause() - return; - } - if(this.anim) this.anim.resume() - if (!this.node || !this.node.isValid) return; - - if(this.skillConfig.EType==EType.timeEnd){ - this.run_time+=deltaTime - if(this.run_time>this.skillConfig.in){ - // //console.log("[SkillCom]: timeEnd destroy",this.s_uuid,this.run_time) - this.is_destroy=true - } - } - - //直线移动 - // if(this.skillConfig.AType == AType.linear) this.startLinearMove(deltaTime); - this.toDestroy(); - } - - toDestroy() { - if(this.is_destroy){ - if (this.ent) { - this.ent.destroy(); - } else { - // 如果ent不存在,直接销毁节点 - if (this.node && this.node.isValid) { - this.node.destroy(); - } - } - } - } - doDestroy(){ - // //console.log("[SkillCom]:doDestroy") - this.is_destroy=true - } - to_console(value:any,value2:any=null,value3:any=null){ - //console.log("[SkillCom]:["+this.s_name+this.s_uuid+"]:",value,value2,value3) - } - - /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ - reset() { - this.is_destroy = false; - this.startPos.set(); - this.targetPos.set(); - this.moveDirection = null; // 重置移动方向 - this.skillConfig = null; // 清除配置缓存 - this.isInitialized = false; // 重置初始化状态 - // 先移除所有碰撞回调 - const collider = this.getComponent(Collider2D); - if (collider) { - collider.off(Contact2DType.BEGIN_CONTACT); - } - this.scheduleOnce(() => { - this.node.destroy(); - }, 0); - } - -} \ No newline at end of file diff --git a/assets/script/game/skills/SkillCom.ts.meta b/assets/script/game/skills/SkillCom.ts.meta deleted file mode 100644 index 63da91da..00000000 --- a/assets/script/game/skills/SkillCom.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "45646a08-c887-40db-85be-d1ce6b7442c3", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/atked.ts b/assets/script/game/skills/atked.ts deleted file mode 100644 index 58fda709..00000000 --- a/assets/script/game/skills/atked.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { _decorator, Component, Node } from 'cc'; -const { ccclass, property } = _decorator; - -@ccclass('atked') -export class atked extends Component { - time = 0.3; - start() { - - } - - update(deltaTime: number) { - this.time = this.time - deltaTime; - if(this.time <= 0) - { - this.node.destroy() - } - } -} - - diff --git a/assets/script/game/skills/atked.ts.meta b/assets/script/game/skills/atked.ts.meta deleted file mode 100644 index 97b4b4a4..00000000 --- a/assets/script/game/skills/atked.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "65d6266f-bba6-4b98-8343-2a67642ec7eb", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/com.meta b/assets/script/game/skills/com.meta deleted file mode 100644 index 1dd28657..00000000 --- a/assets/script/game/skills/com.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "1.2.0", - "importer": "directory", - "imported": true, - "uuid": "9efcc55e-db7c-4761-af6f-ee8bc2f1f63b", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/com/AtkCom.ts b/assets/script/game/skills/com/AtkCom.ts deleted file mode 100644 index a04b9394..00000000 --- a/assets/script/game/skills/com/AtkCom.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { _decorator, UI, UITransform } from "cc"; -import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; -import { HeroViewComp } from "../../hero/HeroViewComp"; -import { SkillCom } from "../SkillCom"; -import { AtkConCom } from "../../skill/AtkConCom"; -import { SkillSet } from "../../common/config/SkillSet"; - -const { ccclass, property } = _decorator; - -/** 视图层对象 */ -@ccclass('AtkComComp') -@ecs.register('AtkCom', false) -export class AtkComComp extends CCComp { - /** 视图层逻辑代码分离演示 */ - start() { - // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象 - // this.on(ModuleEvent.Cmd, this.onHandler, this); - } - - - /** 全局消息逻辑处理 */ - // private onHandler(event: string, args: any) { - // switch (event) { - // case ModuleEvent.Cmd: - // break; - // } - // } - - /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ - reset() { - this.node.destroy(); - } -} \ No newline at end of file diff --git a/assets/script/game/skills/com/AtkCom.ts.meta b/assets/script/game/skills/com/AtkCom.ts.meta deleted file mode 100644 index e6215ec6..00000000 --- a/assets/script/game/skills/com/AtkCom.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "b1d8ed59-0347-4bb6-ab9f-86276714afca", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/debuff.ts b/assets/script/game/skills/debuff.ts deleted file mode 100644 index 474fa95b..00000000 --- a/assets/script/game/skills/debuff.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { _decorator, Component, Node } from 'cc'; -import { timedCom } from './timedCom'; -import { HeroViewComp } from '../hero/HeroViewComp'; -import { smc } from '../common/SingletonModuleComp'; -const { ccclass, property } = _decorator; - -@ccclass('debuff') -export class debuff extends Component { - base: timedCom = null - hero:HeroViewComp = null - deff_cd: number = 0 - ap: number = 0 - start() { - this.base =this.node.getComponent(timedCom) - this.hero = this.node.parent.getComponent(HeroViewComp) - - } - - update(deltaTime: number) { - if(smc.mission.pause) return - this.deff_cd += deltaTime - if(this.deff_cd >=1){ - // this.node.setPosition(v3(-1000,0,0)) - if(this.hero){ - // this.hero.hp_less(Math.ceil(this.base.ap/this.base.time)) - // console.log("debuff 总扣血:"+this.base.ap+" 每秒: "+Math.ceil(this.base.ap/this.base.time)) - } - this.deff_cd=0 - } - } -} - - diff --git a/assets/script/game/skills/debuff.ts.meta b/assets/script/game/skills/debuff.ts.meta deleted file mode 100644 index f543054a..00000000 --- a/assets/script/game/skills/debuff.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "69132caf-02ba-40a8-a835-30baced39701", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/skills/once.ts b/assets/script/game/skills/once.ts deleted file mode 100644 index 1717a51b..00000000 --- a/assets/script/game/skills/once.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { _decorator, Component, Node } from 'cc'; -const { ccclass, property ,} = _decorator; - -@ccclass('once') -export class once extends Component { - - start() { - } - protected onLoad(): void { - - - } - update(deltaTime: number) { - - } -} - - diff --git a/assets/script/game/skills/once.ts.meta b/assets/script/game/skills/once.ts.meta deleted file mode 100644 index 04327fc3..00000000 --- a/assets/script/game/skills/once.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "6e0a995d-16c1-4554-8f80-29394f24213b", - "files": [], - "subMetas": {}, - "userData": {} -}