diff --git a/assets/resources/game/hero/k1.prefab b/assets/resources/game/hero/k1.prefab index a84b8770..83d9bfd5 100644 --- a/assets/resources/game/hero/k1.prefab +++ b/assets/resources/game/hero/k1.prefab @@ -25,32 +25,29 @@ "__id__": 8 }, { - "__id__": 17 + "__id__": 19 }, { - "__id__": 25 + "__id__": 28 }, { - "__id__": 34 + "__id__": 36 }, { - "__id__": 43 + "__id__": 45 }, { - "__id__": 53 + "__id__": 55 }, { - "__id__": 62 + "__id__": 64 }, { - "__id__": 72 + "__id__": 74 } ], "_active": true, "_components": [ - { - "__id__": 80 - }, { "__id__": 82 }, @@ -62,10 +59,13 @@ }, { "__id__": 88 + }, + { + "__id__": 90 } ], "_prefab": { - "__id__": 90 + "__id__": 92 }, "_lpos": { "__type__": "cc.Vec3", @@ -260,7 +260,7 @@ }, { "__type__": "cc.PrefabInstance", - "fileId": "12VQAe3ilGPam5hokpA0Jl", + "fileId": "cdIK+ocxBJRLNeMROksdDi", "prefabRootNode": { "__id__": 1 }, @@ -281,6 +281,9 @@ }, { "__id__": 16 + }, + { + "__id__": 17 } ], "removedComponents": [] @@ -293,7 +296,7 @@ "propertyPath": [ "_name" ], - "value": "buff" + "value": "max" }, { "__type__": "cc.TargetInfo", @@ -311,8 +314,8 @@ ], "value": { "__type__": "cc.Vec3", - "x": 4.377, - "y": 6.809, + "x": 4.3770000000000095, + "y": 6.808999999999969, "z": 0 } }, @@ -357,6 +360,153 @@ ], "value": false }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_color" + ], + "value": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "73D0ZuTQdMDqn/pimi7d34" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 20 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "198e9c93-3ac9-4564-9d0e-63c9836e509a", + "__expectedType__": "cc.Prefab" + }, + "fileId": "54R/aYBglLI4Jn5pm++Jx8", + "instance": { + "__id__": 21 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "12VQAe3ilGPam5hokpA0Jl", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 22 + }, + { + "__id__": 24 + }, + { + "__id__": 25 + }, + { + "__id__": 26 + }, + { + "__id__": 27 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 23 + }, + "propertyPath": [ + "_name" + ], + "value": "buff" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "54R/aYBglLI4Jn5pm++Jx8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 23 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 4.377, + "y": 6.809, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 23 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 23 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 23 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, { "__type__": "cc.Node", "_name": "anm", @@ -369,17 +519,17 @@ "_active": true, "_components": [ { - "__id__": 18 + "__id__": 29 }, { - "__id__": 20 + "__id__": 31 }, { - "__id__": 22 + "__id__": 33 } ], "_prefab": { - "__id__": 24 + "__id__": 35 }, "_lpos": { "__type__": "cc.Vec3", @@ -416,11 +566,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 17 + "__id__": 28 }, "_enabled": true, "__prefab": { - "__id__": 19 + "__id__": 30 }, "_contentSize": { "__type__": "cc.Size", @@ -444,11 +594,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 17 + "__id__": 28 }, "_enabled": true, "__prefab": { - "__id__": 21 + "__id__": 32 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -489,11 +639,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 17 + "__id__": 28 }, "_enabled": true, "__prefab": { - "__id__": 23 + "__id__": 34 }, "playOnLoad": true, "_clips": [ @@ -540,139 +690,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 26 + "__id__": 37 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 25 - }, - "asset": { - "__uuid__": "b895acca-b187-4167-8c4f-de81511c8d55", - "__expectedType__": "cc.Prefab" - }, - "fileId": "2e1WXUIxlLWLT5zBlbV6nF", - "instance": { - "__id__": 27 - }, - "targetOverrides": null - }, - { - "__type__": "cc.PrefabInstance", - "fileId": "79G3PfLDlJdJqsPU4+q+xM", - "prefabRootNode": { - "__id__": 1 - }, - "mountedChildren": [], - "mountedComponents": [], - "propertyOverrides": [ - { - "__id__": 28 - }, - { - "__id__": 30 - }, - { - "__id__": 31 - }, - { - "__id__": 32 - }, - { - "__id__": 33 - } - ], - "removedComponents": [] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 29 - }, - "propertyPath": [ - "_name" - ], - "value": "max" - }, - { - "__type__": "cc.TargetInfo", - "localID": [ - "2e1WXUIxlLWLT5zBlbV6nF" - ] - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 29 - }, - "propertyPath": [ - "_lpos" - ], - "value": { - "__type__": "cc.Vec3", - "x": 3.317, - "y": 48.724, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 29 - }, - "propertyPath": [ - "_lrot" - ], - "value": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 29 - }, - "propertyPath": [ - "_euler" - ], - "value": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - } - }, - { - "__type__": "CCPropertyOverrideInfo", - "targetInfo": { - "__id__": 29 - }, - "propertyPath": [ - "_active" - ], - "value": false - }, - { - "__type__": "cc.Node", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_prefab": { - "__id__": 35 - }, - "__editorExtras__": {} - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 34 + "__id__": 36 }, "asset": { "__uuid__": "e1b8a315-ece3-41a2-941e-a66861753f1b", @@ -680,7 +705,7 @@ }, "fileId": "c46/YsCPVOJYA4mWEpNYRx", "instance": { - "__id__": 36 + "__id__": 38 }, "targetOverrides": null }, @@ -693,20 +718,20 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 37 - }, { "__id__": 39 }, - { - "__id__": 40 - }, { "__id__": 41 }, { "__id__": 42 + }, + { + "__id__": 43 + }, + { + "__id__": 44 } ], "removedComponents": [] @@ -714,7 +739,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 38 + "__id__": 40 }, "propertyPath": [ "_name" @@ -730,7 +755,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 38 + "__id__": 40 }, "propertyPath": [ "_lpos" @@ -745,7 +770,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 38 + "__id__": 40 }, "propertyPath": [ "_lrot" @@ -761,7 +786,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 38 + "__id__": 40 }, "propertyPath": [ "_euler" @@ -776,7 +801,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 38 + "__id__": 40 }, "propertyPath": [ "_active" @@ -790,14 +815,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 44 + "__id__": 46 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 43 + "__id__": 45 }, "asset": { "__uuid__": "50c3d5e4-49f8-4bd7-a15b-cda359a0ae5c", @@ -805,7 +830,7 @@ }, "fileId": "5fqU0L3/FOhKaco5UkHuWT", "instance": { - "__id__": 45 + "__id__": 47 }, "targetOverrides": null }, @@ -818,20 +843,20 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 46 - }, { "__id__": 48 }, - { - "__id__": 49 - }, { "__id__": 50 }, { "__id__": 51 + }, + { + "__id__": 52 + }, + { + "__id__": 53 } ], "removedComponents": [] @@ -839,7 +864,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 47 + "__id__": 49 }, "propertyPath": [ "_name" @@ -855,7 +880,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 47 + "__id__": 49 }, "propertyPath": [ "_lpos" @@ -870,7 +895,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 47 + "__id__": 49 }, "propertyPath": [ "_lrot" @@ -886,7 +911,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 47 + "__id__": 49 }, "propertyPath": [ "_euler" @@ -901,7 +926,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 52 + "__id__": 54 }, "propertyPath": [ "_lpos" @@ -926,14 +951,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 54 + "__id__": 56 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 53 + "__id__": 55 }, "asset": { "__uuid__": "5b4ca49e-0f12-4478-b56d-bf8198b36b90", @@ -941,7 +966,7 @@ }, "fileId": "0d6ZXmA5dHkZxoGONDL2sE", "instance": { - "__id__": 55 + "__id__": 57 }, "targetOverrides": null }, @@ -954,20 +979,20 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 56 - }, { "__id__": 58 }, - { - "__id__": 59 - }, { "__id__": 60 }, { "__id__": 61 + }, + { + "__id__": 62 + }, + { + "__id__": 63 } ], "removedComponents": [] @@ -975,7 +1000,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 57 + "__id__": 59 }, "propertyPath": [ "_name" @@ -991,7 +1016,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 57 + "__id__": 59 }, "propertyPath": [ "_lpos" @@ -1006,7 +1031,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 57 + "__id__": 59 }, "propertyPath": [ "_lrot" @@ -1022,7 +1047,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 57 + "__id__": 59 }, "propertyPath": [ "_euler" @@ -1037,7 +1062,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 57 + "__id__": 59 }, "propertyPath": [ "_active" @@ -1051,14 +1076,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 63 + "__id__": 65 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 62 + "__id__": 64 }, "asset": { "__uuid__": "ec11e9f5-3347-4d5e-8ed8-f98a6ac7963a", @@ -1066,7 +1091,7 @@ }, "fileId": "c46/YsCPVOJYA4mWEpNYRx", "instance": { - "__id__": 64 + "__id__": 66 }, "targetOverrides": null }, @@ -1079,15 +1104,9 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 65 - }, { "__id__": 67 }, - { - "__id__": 68 - }, { "__id__": 69 }, @@ -1096,6 +1115,12 @@ }, { "__id__": 71 + }, + { + "__id__": 72 + }, + { + "__id__": 73 } ], "removedComponents": [] @@ -1103,7 +1128,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 66 + "__id__": 68 }, "propertyPath": [ "_name" @@ -1119,7 +1144,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 66 + "__id__": 68 }, "propertyPath": [ "_lpos" @@ -1134,7 +1159,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 66 + "__id__": 68 }, "propertyPath": [ "_lrot" @@ -1150,7 +1175,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 66 + "__id__": 68 }, "propertyPath": [ "_euler" @@ -1165,7 +1190,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 66 + "__id__": 68 }, "propertyPath": [ "_lscale" @@ -1180,7 +1205,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 66 + "__id__": 68 }, "propertyPath": [ "_active" @@ -1194,14 +1219,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 73 + "__id__": 75 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 72 + "__id__": 74 }, "asset": { "__uuid__": "ae4493bd-cbcc-4392-921c-3e2b0fcd5338", @@ -1209,7 +1234,7 @@ }, "fileId": "91yoyAQGNDm5ziI7NUChZ+", "instance": { - "__id__": 74 + "__id__": 76 }, "targetOverrides": null }, @@ -1222,17 +1247,17 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 75 - }, { "__id__": 77 }, { - "__id__": 78 + "__id__": 79 }, { - "__id__": 79 + "__id__": 80 + }, + { + "__id__": 81 } ], "removedComponents": [] @@ -1240,7 +1265,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_name" @@ -1256,7 +1281,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_lpos" @@ -1271,7 +1296,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_lrot" @@ -1287,7 +1312,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_euler" @@ -1309,7 +1334,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 81 + "__id__": 83 }, "_contentSize": { "__type__": "cc.Size", @@ -1337,7 +1362,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 83 + "__id__": 85 }, "enabledContactListener": true, "bullet": true, @@ -1371,7 +1396,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 85 + "__id__": 87 }, "tag": 0, "_group": 4, @@ -1405,10 +1430,10 @@ }, "_enabled": true, "__prefab": { - "__id__": 87 + "__id__": 89 }, "animator": { - "__id__": 22 + "__id__": 33 }, "_id": "" }, @@ -1426,7 +1451,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 89 + "__id__": 91 }, "_id": "" }, @@ -1447,22 +1472,22 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": [ { - "__id__": 72 + "__id__": 74 }, { - "__id__": 62 + "__id__": 64 }, { - "__id__": 53 + "__id__": 55 }, { - "__id__": 43 + "__id__": 45 }, { - "__id__": 34 + "__id__": 36 }, { - "__id__": 25 + "__id__": 19 }, { "__id__": 8 diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 565e3e8c..a24828ab 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -4,7 +4,7 @@ export const HeroInfo = { uuid: 9001, path: "k1", type: 1, lv: 1,name: "白骑士", wp:1001,arm:2001,ring:3001,shoes:4001, exp_type:0,lv2:5,lv3:10,lv4:20,lv5:30,a_exp:1,ua_exp:1,d_exp:10,ed_exp:1,a_buff:8101,ua_buff:8201,d_buff:8301,ed_buff:8401, ap: 20, ap_rate:0.1, hp: 100, hp_rate:0.1, def:10,def_rate:0.1, dis: 100, a_cd: 1, power: 0, power_max: 15, speed: 40, - sk1: 9001, sk2: 2002, sk3: 9003, sk4: 9004, sk5: 9005, sk6: 9006, atktype: 1, + sk1: 9001, sk2: 2002, sk3: 9003, sk4: 9004, sk5: 9005, sk6: 9006, atktype: 1,skr:[0,10,20,30,40,50] }, diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 47a1892f..7f3fafe7 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -81,13 +81,14 @@ export class Hero extends ecs.Entity { hv.speed =hv.ospeed = HInf.speed; hv.dis = HInf.dis; hv.power = HInf.power; - hv.level = HInf.level; + hv.lv = HInf.lv; hv.type = HInf.type; hv.sk1 = HInf.sk1; hv.sk2 = HInf.sk2; hv.sk3 = HInf.sk3; hv.sk4 = HInf.sk4; - hv.sk5 = HInf.sk5; + hv.sk5 = HInf.sk5; + hv.skr = HInf.skr; hv.type = HInf.type; hv.hp= hv.hp_max =HInf.hp; hv.ap = HInf.ap; diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index c06841a4..4badbbe7 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -40,14 +40,14 @@ export class HeroViewComp extends CCComp { hero_uuid:number = 1001; hero_name : string = "hero"; hero_type:number = 1; - level:number =1; + lv:number =1; scale: number = 1; /** 角色阵营 1:hero -1 :mon */ type: number = 1; /**角色类型 1近战 2 远程 3 辅助 */ box_group:number = BoxSet.HERO; atk_range:number = 150; private timer:Timer = new Timer(1); //计时器 - + is_dead:boolean = false; //是否摧毁 is_stop:boolean = false; @@ -66,7 +66,7 @@ export class HeroViewComp extends CCComp { sk3:number = 1001; sk4:number = 1001; sk5:number = 1001; - + skr:any=[0,0,0,0,0,0]; ap: number = 10; /**攻击力 */ ap_buff: number = 0; ap_buffs:any = []; @@ -204,9 +204,9 @@ export class HeroViewComp extends CCComp { this.node.setPosition(pos) return } - if (this.timer.update(dt)) { - this.power_change(this.power_speed) - } + // if (this.timer.update(dt)) { + // this.power_change(this.power_speed) + // } // if(this.anm_timer.update(dt)) { // this.change_anm() // } @@ -307,20 +307,6 @@ export class HeroViewComp extends CCComp { this.node.getChildByName("top").getChildByName("hp").active = true; } } - - power_change(power: number){ - this.power += power; - if(this.power >= this.power_max){ - this.as.atk() - // this.to_speek(smc.skills[this.sk2].name) - this.scheduleOnce(()=>{ - this.handle_skill(this.sk2); - },0.5) - this.power = 0 - } - // let power_progress= this.power/this.power_max; - // this.node.getChildByName("top").getChildByName("power").getComponent(ProgressBar)!.progress = power_progress; - } skill_pos(){ return v3(0,35) } @@ -343,6 +329,54 @@ export class HeroViewComp extends CCComp { return {pos,t_pos} } + + in_atk(dt: number) { + if(this.at >= this.cd){ + if(this.is_atking){ + this.at = 0; + // console.log("cd:"+this.cd); + this.as.atk(); + let i = RandomManager.instance.getRandomInt(0,100,3) + console.log("大招触发判断: i="+i+":skr="+this.skr[this.lv]); + if(i < this.skr[this.lv]){ + this.node.getChildByName("max").active=true + this.scheduleOnce(()=>{ + this.node.getChildByName("max").active=false + },0.8) + this.handle_skill(this.sk2) + + return + } + this.scheduleOnce(()=>{ + this.shoot_enemy(this.sk1) + },0.3) + + } + } + } + //使用max_skill + handle_skill(skill:number){ + + switch (smc.skills[skill].tg) { + case 0: //自己 + this.to_add_buff(this.node.getComponent(HeroViewComp),skill) + break; + case 1: //伙伴 + this.push_least_buff(skill) + break; + case 2: //自己和伙伴 + this.to_add_buff(this.node.getComponent(HeroViewComp),skill) + this.push_least_buff(skill) + break; + case 3: //敌人 + this.shoot_enemy(skill) + break; + case 4: //敌人和自己 + this.to_add_buff(this.node.getComponent(HeroViewComp),skill) + this.shoot_enemy(skill) + break; + } + } shoot_enemy(sk1:number,y:number=0,x:number=0){ // console.log("mon shoot_enemy"); let skill = ecs.getEntity(Skill); @@ -413,32 +447,7 @@ export class HeroViewComp extends CCComp { } } - //使用max_skill - handle_skill(skill:number){ - this.node.getChildByName("max").active=true - this.scheduleOnce(()=>{ - this.node.getChildByName("max").active=false - },0.8) - switch (smc.skills[skill].tg) { - case 0: //自己 - this.to_add_buff(this.node.getComponent(HeroViewComp),skill) - break; - case 1: //伙伴 - this.push_least_buff(skill) - break; - case 2: //自己和伙伴 - this.to_add_buff(this.node.getComponent(HeroViewComp),skill) - this.push_least_buff(skill) - break; - case 3: //敌人 - this.shoot_enemy(skill) - break; - case 4: //敌人和自己 - this.to_add_buff(this.node.getComponent(HeroViewComp),skill) - this.shoot_enemy(skill) - break; - } - } + to_speek(words:string,time:number=0.5){ this.speek_time=0.5 this.node.getChildByName("tooltip").active=true @@ -455,24 +464,9 @@ export class HeroViewComp extends CCComp { this.node.getChildByName("tooltip").active=false; } } - - - in_atk(dt: number) { - if(this.at >= this.cd){ - if(this.is_atking){ - this.at = 0; - console.log("cd:"+this.cd); - this.as.atk(); - this.scheduleOnce(()=>{ - this.shoot_enemy(this.sk1) - },0.4) - } - } - } heathed(){ this.node.getChildByName("heathed").active=true - } hp_max_add(){ console.log("hp_max_add 动画"); @@ -527,7 +521,6 @@ export class HeroViewComp extends CCComp { } // console.log(this.ap_buffs) } - check_atk_buffs(dt: number){ for(let i=0;i 0){ this.node.getChildByName("shielded").active=true } } - tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=60){ // console.log("tooltip",type); let tip =ecs.getEntity(Tooltip);