技能动画 继续完善
This commit is contained in:
@@ -21,7 +21,7 @@ sk_uuid:子技能id
|
||||
sk_count:子技能个数
|
||||
sp_name : 预制体名称
|
||||
path: 图片地址
|
||||
run:number = 0;0:碰撞不消亡 1:碰撞即消亡
|
||||
mber = 0;0:碰撞不消亡 1:碰撞即消亡
|
||||
with:false,debuff: 0depb:50,:无,1:冰,2:灼烧,3:眩晕,4:降低攻击,5:降低hp,6:降低防御,7:吸血,8:击退
|
||||
*/
|
||||
|
||||
@@ -47,78 +47,96 @@ export enum skRun {
|
||||
runing = 0,
|
||||
dead = 1,
|
||||
}
|
||||
/**
|
||||
* 技能配置集合
|
||||
* @description 该文件定义了游戏中各种技能的详细配置信息,包括技能ID、名称、图标、伤害类型等属性。
|
||||
* 每个技能都是一个对象,包含多个属性来描述技能的特性和效果。
|
||||
* @example
|
||||
* // 技能ID为6001的技能配置
|
||||
* {
|
||||
* uuid: 6001,
|
||||
* path: "6001",
|
||||
* run: 1,
|
||||
* type: 1,
|
||||
* tg: 3,
|
||||
* ... // 其他属性
|
||||
* name: "寒冰弹",
|
||||
* sp_name: "ball_blue",
|
||||
* info: "释放一个火球术攻击敌人"
|
||||
* }
|
||||
*/
|
||||
export const SkillSet={
|
||||
6001:{uuid: 6001,path: "6001",run:1,type:1,tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
6001:{uuid: 6001,path: "6001",type:1,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
name: "寒冰弹",sp_name:"ball_blue",info:"释放一个火球术攻击敌人"},
|
||||
|
||||
6002:{uuid: 6002,path: "6002",run:1,type:1,tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
6002:{uuid: 6002,path: "6002",type:1,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
name: "火焰弹",sp_name:"ball_red",info:"释放一个火球术攻击敌人"},
|
||||
|
||||
6003:{uuid: 6003,path: "6003",run:1,type:1,tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
6003:{uuid: 6003,path: "6003",type:1,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
name: "魔法弹",sp_name:"ball_green",info:"释放一个火球术攻击敌人"},
|
||||
|
||||
6004:{uuid: 6004,path: "6004",run:1,type:1,tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
6004:{uuid: 6004,path: "6004",type:1,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
name: "圣光弹",sp_name:"ball_yellow",info:"释放一个火球术攻击敌人"},
|
||||
|
||||
6005:{uuid: 6005,path: "6005",run:1,type:1,tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6005:{uuid: 6005,path: "6005",type:1,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "无形剑气",sp_name:"patk",info:"释放无形剑气攻击前方直线100码的敌人"},
|
||||
|
||||
6006:{uuid: 6006,path: "6006",run:1,type:1,tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6006:{uuid: 6006,path: "6006",type:1,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "射击",sp_name:"arrow",info:"释放无形剑气攻击前方直线100码的敌人"},
|
||||
|
||||
6011:{uuid: 6011,path: "6011",run:0,type:1, tg:3,with:false,debuff:0,depb:50,debtime:2,derate:1,in:3,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:0.5,shield:0,speed:100,sonsk:0,
|
||||
6011:{uuid: 6011,path: "6011",type:1, tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:0.5,shield:0,speed:100,sonsk:0,
|
||||
name: "烈火呼吸",sp_name:"firequan",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
|
||||
|
||||
6012:{uuid: 6012,path: "6012",run:0,type:1, tg:3,with:false,debuff:2,depb:50,debtime:6,derate:1,in:1,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6012:{uuid: 6012,path: "6012",type:1, tg:3,with:false,debuff:2,depb:20,debtime:2,derate:1,in:1,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "大火球",sp_name:"fire",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6013:{uuid: 6013,path: "6013",run:0,type:1, tg:3,with:false,debuff:7,depb:50,debtime:2,derate:0.01,in:10,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6013:{uuid: 6013,path: "6013",type:1, tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:10,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "火墙",sp_name:"fires",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6014:{uuid: 6014,path: "6014",run:0,type:1, tg:3,with:false,debuff:1,depb:50,debtime:2,derate:1,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "寒冰箭",sp_name:"ice",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
6014:{uuid: 6014,path: "6014",type:1, tg:3,with:false,debuff:1,depb:20,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "寒冰箭",sp_name:"arrow_blue",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6015:{uuid: 6015,path: "6015",run:0,type:1, tg:3,with:false,debuff:3,depb:50,debtime:6,derate:1,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6015:{uuid: 6015,path: "6015",type:1, tg:3,with:false,debuff:3,depb:20,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "火焰射击",sp_name:"arrow_yellow",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6016:{uuid: 6016,path: "6016",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:6,derate:1,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:300,sonsk:0,
|
||||
6016:{uuid: 6016,path: "6016",type:1, tg:3,with:false,debuff:8,depb:50,debtime:1,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:300,sonsk:0,
|
||||
name: "龙卷风",sp_name:"bwind",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6017:{uuid: 6017,path: "6017",run:0,type:1, tg:2,with:false,debuff:0,depb:50,debtime:2,derate:1,in:5,count:1,def:0,apup:0,ap:100,mhp:0,hp:20,cd:1,shield:0,speed:450, sonsk:0,
|
||||
6017:{uuid: 6017,path: "6017",type:1, tg:2,with:false,debuff:0,depb:0,debtime:0,derate:0,in:5,count:1,def:0,apup:0,ap:100,mhp:0,hp:20,cd:1,shield:0,speed:450, sonsk:0,
|
||||
name: "复苏",sp_name:"heath",info:"5秒持续为全体友方恢复施法者最大生命值20%的生命"},
|
||||
|
||||
6018:{uuid: 6018,path: "6018",run:0,type:1, tg:0,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:5,speed:450, sonsk:0,
|
||||
6018:{uuid: 6018,path: "6018",type:1, tg:0,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:5,speed:450, sonsk:0,
|
||||
name: "魔法盾",sp_name:"shield",info:"释放一个寒冰箭攻击敌人"},
|
||||
|
||||
6019:{uuid: 6019,path: "6019",run:0,type:1, tg:0,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
6019:{uuid: 6019,path: "6019",type:1, tg:0,with:false,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:1,shield:0,speed:450, sonsk:0,
|
||||
name: "狂暴",sp_name:"atkup",info:"释放一个寒冰箭攻击敌人"},
|
||||
|
||||
6020:{uuid: 6020,path: "6020",run:2,type:2,tg:3,with:false,debuff:0,depb:50,debtime:0,derate:0,in:1,count:1,def:0,apup:0,ap:900,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:6021,
|
||||
6020:{uuid: 6020,path: "6020",type:2,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:1,count:1,def:0,apup:0,ap:900,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:6021,
|
||||
name: "致命射击",sp_name:"shoot1",info:"瞬间对最后排敌人造成致命射击"},
|
||||
|
||||
6021:{uuid: 6021,path: "6021",run:2,type:2,tg:3,with:false,debuff:0,depb:50,debtime:0,derate:0,in:1,count:1,def:0,apup:0,ap:900,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6021:{uuid: 6021,path: "6021",type:2,tg:3,with:false,debuff:0,depb:0,debtime:0,derate:0,in:1,count:1,def:0,apup:0,ap:900,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "致命射击2",sp_name:"shoot2",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6022:{uuid: 6022,path: "6022",run:0,type:1, tg:3,with:false,debuff:1,depb:50,debtime:2,derate:1,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6022:{uuid: 6022,path: "6022",type:1, tg:3,with:false,debuff:1,depb:50,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "冰刺",sp_name:"icez",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6023:{uuid: 6023,path: "6023",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:1,count:1,def:0,apup:0,ap:400,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
6023:{uuid: 6023,path: "6023",type:1, tg:3,with:false,debuff:8,depb:50,debtime:1,derate:0,in:1,count:1,def:0,apup:0,ap:400,mhp:0,hp:0,cd:1,shield:0,speed:450,sonsk:0,
|
||||
name: "冰墙",sp_name:"icet",info:"释放有形剑气攻击前方直线300码的敌人"},
|
||||
|
||||
6024:{uuid: 6024,path: "6024",run:0,type:1, tg:3,with:true,debuff:8,depb:50,debtime:2,derate:1,in:2,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:0.5,shield:0,speed:100,sonsk:0,
|
||||
6024:{uuid: 6024,path: "6024",type:1, tg:3,with:true,debuff:8,depb:50,debtime:1,derate:0,in:2,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:0.5,shield:0,speed:100,sonsk:0,
|
||||
name: "旋风斩",sp_name:"fwind",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
|
||||
|
||||
6025:{uuid: 6025,path: "6025",run:1,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:1,shield:0,speed:500,sonsk:0,
|
||||
6025:{uuid: 6025,path: "6025",type:1, tg:3,with:false,debuff:8,depb:50,debtime:1,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:1,shield:0,speed:500,sonsk:0,
|
||||
name: "螺旋击",sp_name:"fireball",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
|
||||
|
||||
6026:{uuid: 6026,path: "6026",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:1,shield:0,speed:500,sonsk:0,
|
||||
6026:{uuid: 6026,path: "6026",type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:1,shield:0,speed:500,sonsk:0,
|
||||
name: "潮汐",sp_name:"watert",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
|
||||
|
||||
6027:{uuid: 6027,path: "6027",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:1,shield:0,speed:500,sonsk:0,
|
||||
6027:{uuid: 6027,path: "6027",type:1, tg:3,with:false,debuff:8,depb:100,debtime:2,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:1,shield:0,speed:500,sonsk:0,
|
||||
name: "战斗冲击",sp_name:"zhanz",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
|
||||
|
||||
6028:{uuid: 6028,path: "6028",run:0,type:1, tg:0,with:false,debuff:0,depb:50,debtime:2,derate:1,in:2,count:1,def:0,apup:0,ap:100,mhp:0,hp:10,cd:2,shield:2,speed:450, sonsk:0,
|
||||
name: "自然庇佑",sp_name:"heath2",info:"5秒持续为全体友方恢复施法者最大生命值10%的生命,和施法者200%攻击力的护甲"},
|
||||
6028:{uuid: 6028,path: "6028",type:1, tg:0,with:false,debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:0,apup:0,ap:100,mhp:0,hp:10,cd:2,shield:2,speed:450, sonsk:0,
|
||||
name: "自然庇佑",sp_name:"heath2",info:"为全体友方恢复施法者最大生命值10%的生命,和抵御2次攻击的护盾"},
|
||||
}
|
||||
|
||||
export const MSklist = [6001,6002]
|
||||
|
||||
@@ -334,6 +334,13 @@ export class HeroViewComp extends CCComp {
|
||||
l_hp=l_hp*(100+luck)/100
|
||||
return Math.ceil(l_hp)
|
||||
}
|
||||
/**
|
||||
* 检查并处理英雄受到的减益效果(debuff)。
|
||||
* 根据技能的不同减益类型,执行相应的逻辑,如冰冻、燃烧等。
|
||||
*
|
||||
* @param skill - 包含减益效果信息的技能对象
|
||||
* @param l_hp - 可选参数,表示英雄的当前生命值,默认为0
|
||||
*/
|
||||
check_debuff(skill:any,l_hp:number=0){
|
||||
console.log(this.hero_name+":"+this.uuid+"check_debuff "+skill.debuff);
|
||||
if(skill.debuff == 0) return
|
||||
|
||||
14
assets/script/game/skills/AnmEndCom.ts
Normal file
14
assets/script/game/skills/AnmEndCom.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('AnmEndCom')
|
||||
export class AnmEndCom extends Component {
|
||||
start() {
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3a728fd7-22ba-4bcf-bb88-588390346a31",
|
||||
"uuid": "9a6c0cbd-2b5b-4ecd-85d3-c017de7a5b2a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
@@ -2,13 +2,15 @@ import { _decorator, Animation, Component, Node } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('OnceCom')
|
||||
export class OnceCom extends Component {
|
||||
start() {
|
||||
@ccclass('EndAnmCom')
|
||||
export class EndAnmCom extends Component {
|
||||
start() {
|
||||
let anim = this.node.getComponent(Animation);
|
||||
console.log("动画",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
onAnimationFinished(){
|
||||
console.log("动画播放完毕")
|
||||
let bese = this.node.getComponent(SkillCom)
|
||||
bese.is_destroy = true
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "34a04999-1c8d-4380-b218-59d8a41818a6",
|
||||
"uuid": "9e0d3c9a-ca28-4530-a9ba-b2dfa4086dc3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
20
assets/script/game/skills/EndBoxCom.ts
Normal file
20
assets/script/game/skills/EndBoxCom.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { _decorator, Collider2D, Component, Contact2DType, Node } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('EndBoxCom')
|
||||
export class EndBoxCom extends Component {
|
||||
base:SkillCom = null
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
let collider = this.getComponent(Collider2D);
|
||||
if (collider) {
|
||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
}
|
||||
}
|
||||
onBeginContact (seCol: Collider2D, otCol: Collider2D) {
|
||||
if(otCol.group != seCol.group&&otCol.tag ==0)this.base.is_destroy=true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/skills/EndBoxCom.ts.meta
Normal file
9
assets/script/game/skills/EndBoxCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "2332add2-8701-4636-bd89-184f6f4893de",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
22
assets/script/game/skills/EndLineCom.ts
Normal file
22
assets/script/game/skills/EndLineCom.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/skills/EndLineCom.ts.meta
Normal file
9
assets/script/game/skills/EndLineCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "c92ad7af-330c-4161-86c5-8d5736e5e57d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
23
assets/script/game/skills/EndTimeCom.ts
Normal file
23
assets/script/game/skills/EndTimeCom.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('EndTimeCom')
|
||||
export class EndTimeCom extends Component {
|
||||
time:number = 0
|
||||
base:SkillCom = null
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
if(smc.mission.pause) return
|
||||
this.time+=deltaTime
|
||||
if(this.time>=this.base.in_time){
|
||||
this.base.is_destroy = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/skills/EndTimeCom.ts.meta
Normal file
9
assets/script/game/skills/EndTimeCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "6a7fe8c9-c479-4ce6-bfd3-4bc2051752aa",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -14,9 +14,6 @@ export class LineCom extends Component {
|
||||
update(deltaTime: number) {
|
||||
if(smc.mission.pause) return
|
||||
this.node.setPosition(this.node.position.x+this.base.speed*deltaTime,this.node.position.y,this.node.position.z)
|
||||
if(this.node.position.x>1000||this.node.position.x<-1000){
|
||||
this.base.is_destroy = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ export class LineMCom extends Component {
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
if(smc.mission.pause) return
|
||||
if(smc.mission.pause) return
|
||||
this.cd+=deltaTime
|
||||
if(this.cd >= this.base.cd){
|
||||
@@ -23,14 +22,8 @@ export class LineMCom extends Component {
|
||||
this.node.active = true
|
||||
this.cd=0
|
||||
}
|
||||
this.time+=deltaTime
|
||||
if(this.time>=this.base.in_time){
|
||||
this.base.is_destroy = true
|
||||
}
|
||||
this.node.setPosition(this.node.position.x+this.base.speed*deltaTime,this.node.position.y,this.node.position.z)
|
||||
if(this.node.position.x>1000||this.node.position.x<-1000){
|
||||
this.base.is_destroy = true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import { _decorator, Component, Node, tween, Vec3 } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
import { SkillSet } from '../common/config/SkillSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('NoRunCom')
|
||||
export class NoRunCom extends Component {
|
||||
base:SkillCom
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ export class Skill extends ecs.Entity {
|
||||
sv.debuff = SkillSet[uuid].debuff;
|
||||
sv.depb = SkillSet[uuid].depb;
|
||||
sv.derate = SkillSet[uuid].derate;
|
||||
sv.run = SkillSet[uuid].run;
|
||||
sv.is_crit=is_crit
|
||||
sv.crit_add=crit_add
|
||||
// node.setScale(v3(node.scale.x*scale,node.scale.y))
|
||||
|
||||
@@ -60,9 +60,6 @@ export class SkillCom extends CCComp {
|
||||
onBeginContact (seCol: Collider2D, otCol: Collider2D, contact: IPhysics2DContact | null) {
|
||||
if(otCol.group != seCol.group&&otCol.tag ==0){
|
||||
this.atk_count+=1
|
||||
if(this.run==1 ){
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
if(otCol.group == seCol.group&&otCol.tag ==0&&(this.tg==2||this.tg==0)){
|
||||
this.to_console("skill onBeginContact 是对自己人的buff",seCol,otCol)
|
||||
|
||||
@@ -14,7 +14,7 @@ export class timedCom extends Component {
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
this.time = this.time - deltaTime;
|
||||
this.time -= deltaTime;
|
||||
if(this.time <= 0)
|
||||
{
|
||||
this.node.destroy()
|
||||
|
||||
Reference in New Issue
Block a user