技能选择 需要确定是技能1 23 中的哪个

This commit is contained in:
2025-06-26 16:44:22 +08:00
parent d31c495a54
commit b00cc9536f
5 changed files with 3531 additions and 2608 deletions

View File

@@ -0,0 +1,258 @@
[
{
"__type__": "cc.AnimationClip",
"_name": "getbsn",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 24,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 0.8333333333333334,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 11
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.VectorTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channels": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
}
],
"_nComponents": 3
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
"scale"
]
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 4
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.4166666567325592,
0.8333333134651184
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0.5,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0.6000000238418579,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0.5,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 6
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.4166666567325592,
0.8333333134651184
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0.5,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0.6000000238418579,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0.5,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 8
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.4166666567325592,
0.8333333134651184
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 10
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "ccc5a52a-8894-4c47-90b9-61ca72c737d3",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "getbsn"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -51,8 +51,8 @@ export class MissionComp extends CCComp {
smc.vmdata.mission_data.current_wave++
let wave=smc.vmdata.mission_data.current_wave
if(wave==FightSet.FRIEND_WAVE_UP){
console.log("[任务系统] FRIEND_WAVE_UP 英雄选择 :",wave,FightSet.FRIEND_WAVE_UP)
this.to_call_friend()
let node= this.node.getChildByName("new_hero")
tween(node).to(0.3, {position:v3(node.position.x-200,node.position.y,1)}).start()
}
if(wave==FightSet.BOSS_WAVE_UP_1){
console.log("[任务系统] BOSS_WAVE_UP_1 装备选择 :",wave,FightSet.BOSS_WAVE_UP_1)
@@ -74,15 +74,15 @@ export class MissionComp extends CCComp {
}
if(wave==FightSet.SKILL_WAVE_UP_1){
console.log("[任务系统] SKILL_WAVE_UP_1 技能选择 :",wave,FightSet.SKILL_WAVE_UP_1)
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
this.show_skill_get("skill1")
}
if(wave==FightSet.SKILL_WAVE_UP_2){
console.log("[任务系统] SKILL_WAVE_UP_2 技能选择 :",wave,FightSet.SKILL_WAVE_UP_2)
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
this.show_skill_get("skill2")
}
if(wave==FightSet.SKILL_WAVE_UP_3){
console.log("[任务系统] SKILL_WAVE_UP_3 技能选择 :",wave,FightSet.SKILL_WAVE_UP_3)
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
this.show_skill_get("skill3")
}
}
@@ -119,6 +119,22 @@ export class MissionComp extends CCComp {
oops.message.dispatchEvent(GameEvent.FightEnd)
}
private show_skill_get(e:string){
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(e).getChildByName("get").active =true
}
private hide_skill_get(e:any,data:string){
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(data).getChildByName("get").active =false
}
private show_skill_change(e:string){
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(e).getChildByName("change").active =true
}
private hide_skill_change(e:any,data:any){
this.node.getChildByName("equips").getChildByName("boxs").getChildByName(data).getChildByName("change").active =false
}
fight_end(){
console.log("任务结束")
// 延迟0.5秒后执行任务结束逻辑
@@ -184,10 +200,16 @@ export class MissionComp extends CCComp {
mission_data.gold-=(mission_data.refresh_gold+mission_data.buff_refresh_gold)
}
call_skill_card(e:any){
oops.message.dispatchEvent(GameEvent.HeroSkillSelect)
}
private cleanComponents() {
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});
}
hide_call_friend(){
let node =this.node.getChildByName("new_hero")
tween(node).to(0.3, {position:v3(node.position.x+200,node.position.y,1)}).start()
}
/** 视图层逻辑代码分离演示 */
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */

View File

@@ -59,7 +59,7 @@ export class Skill extends ecs.Entity {
node.parent = parent;
node.setPosition(startPos);
node.angle+=angle
console.log("[Skill]:node=>",startPos)
// console.log("[Skill]:node=>",startPos)
// 添加技能组件
const SComp = node.getComponent(SkillCom); // 初始化技能参数
if (!SComp) {
@@ -85,7 +85,7 @@ export class Skill extends ecs.Entity {
SComp.caster_crit = ap_data.crit
SComp.caster_crit_d = ap_data.crit_d
console.log("[Skill]:caster=>",caster,config.name+"scomp=>",SComp,"fightcon=>",FIGHTCON)
// console.log("[Skill]:caster=>",caster,config.name+"scomp=>",SComp,"fightcon=>",FIGHTCON)
// 设置技能组件属性
Object.assign(SComp, {
s_uuid: uuid,
@@ -114,10 +114,10 @@ export class Skill extends ecs.Entity {
if(view.is_friend) buff=FIGHTCON.friend_buff
if(view.is_boss) buff=FIGHTCON.enemy_buff
if(view.is_kalami) buff=FIGHTCON.enemy_buff
if(!buff==null) {
if(buff!==null) {
buff_ap=(100+buff.ATK)/100 //装备区 总加成
}
// console.log("[skill] buff ",buff,"buff_ap",buff_ap)
// 汇总DEBUFF_DECD并处理count值
let BUFF_ATK = 0
let DEBUFF_DEATK = 0
@@ -143,9 +143,10 @@ export class Skill extends ecs.Entity {
let BUFF_AP=(100-DEBUFF_DEATK+BUFF_ATK+dmg)/100 //buff区 总加成
ap=view.ap*buff_ap*BUFF_AP*SkillSet[uuid].ap/100
// console.log("[Skill] skill ap:"+view.hero_name+"=>"+ap+" "+buff_ap+" "+BUFF_AP)
crit=view.crit+buff.CRITICAL
crit_d=view.crit_d+buff.CRITICAL_DMG
console.log("[Skill]:ap=>",ap,"crit=>",crit,"crit_d=>",crit_d)
// console.log("[Skill]:ap=>",ap,"crit=>",crit,"crit_d=>",crit_d)
return {ap,crit,crit_d}
}
}