This commit is contained in:
2025-06-27 08:36:34 +08:00
parent 0a25259cf4
commit cba52086c2
11 changed files with 4429 additions and 4076 deletions

View File

@@ -11,18 +11,21 @@
"speed": 1, "speed": 1,
"wrapMode": 2, "wrapMode": 2,
"enableTrsBlending": false, "enableTrsBlending": false,
"_duration": 0.8333333333333334, "_duration": 1.4166666666666667,
"_hash": 500763545, "_hash": 500763545,
"_tracks": [ "_tracks": [
{ {
"__id__": 1 "__id__": 1
},
{
"__id__": 11
} }
], ],
"_exoticAnimation": null, "_exoticAnimation": null,
"_events": [], "_events": [],
"_embeddedPlayers": [], "_embeddedPlayers": [],
"_additiveSettings": { "_additiveSettings": {
"__id__": 11 "__id__": 15
}, },
"_auxiliaryCurveEntries": [] "_auxiliaryCurveEntries": []
}, },
@@ -81,9 +84,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
}, },
{ {
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
@@ -95,9 +96,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
}, },
{ {
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
@@ -109,9 +108,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
} }
], ],
"preExtrapolation": 1, "preExtrapolation": 1,
@@ -141,9 +138,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
}, },
{ {
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
@@ -155,9 +150,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
}, },
{ {
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
@@ -169,9 +162,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
} }
], ],
"preExtrapolation": 1, "preExtrapolation": 1,
@@ -201,9 +192,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
}, },
{ {
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
@@ -215,9 +204,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
}, },
{ {
"__type__": "cc.RealKeyframeValue", "__type__": "cc.RealKeyframeValue",
@@ -229,9 +216,7 @@
"leftTangent": 0, "leftTangent": 0,
"leftTangentWeight": 1, "leftTangentWeight": 1,
"easingMethod": 0, "easingMethod": 0,
"__editorExtras__": { "__editorExtras__": null
"tangentMode": 0
}
} }
], ],
"preExtrapolation": 1, "preExtrapolation": 1,
@@ -250,6 +235,105 @@
"preExtrapolation": 1, "preExtrapolation": 1,
"postExtrapolation": 1 "postExtrapolation": 1
}, },
{
"__type__": "cc.animation.QuatTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 12
},
"proxy": null
},
"_channel": {
"__id__": 13
}
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
"rotation"
]
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 14
}
},
{
"__type__": "cc.QuatCurve",
"_times": [
0.8333333134651184,
1,
1.125,
1.25,
1.4166666269302368
],
"_values": [
{
"__type__": "cc.QuatKeyframeValue",
"interpolationMode": 0,
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"easingMethod": 0
},
{
"__type__": "cc.QuatKeyframeValue",
"interpolationMode": 0,
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.05000000074505806,
"w": 1
},
"easingMethod": 0
},
{
"__type__": "cc.QuatKeyframeValue",
"interpolationMode": 0,
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"easingMethod": 0
},
{
"__type__": "cc.QuatKeyframeValue",
"interpolationMode": 0,
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.05000000074505806,
"w": 1
},
"easingMethod": 0
},
{
"__type__": "cc.QuatKeyframeValue",
"interpolationMode": 0,
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"easingMethod": 0
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{ {
"__type__": "cc.AnimationClipAdditiveSettings", "__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false, "enabled": false,

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,7 @@ export enum GameEvent {
HeroSkillSelectEnd = "HeroSkillSelectEnd", HeroSkillSelectEnd = "HeroSkillSelectEnd",
HeroSelect = "HeroSelect", HeroSelect = "HeroSelect",
FriendCalled = "FriendCalled", FriendCalled = "FriendCalled",
MasterCalled = "MasterCalled",
FightStart = "FightStart", FightStart = "FightStart",
FightPause = "FightPause", FightPause = "FightPause",
FightResume = "FightResume", FightResume = "FightResume",
@@ -48,4 +49,5 @@ export enum GameEvent {
ChangeATK_EQUIP_SPECIAL_ATTR = "ChangeATK_EQUIP_SPECIAL_ATTR", ChangeATK_EQUIP_SPECIAL_ATTR = "ChangeATK_EQUIP_SPECIAL_ATTR",
UpdateVMData = "UpdateVMData", UpdateVMData = "UpdateVMData",
UpdateHP = "UpdateHP", UpdateHP = "UpdateHP",
APChange = "APChange",
} }

View File

@@ -10,6 +10,7 @@ import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { SkillConComp } from "./SkillConComp"; import { SkillConComp } from "./SkillConComp";
import { FriendModelComp } from "./FriendModel"; import { FriendModelComp } from "./FriendModel";
import { MasterModelComp } from "./MasterModel"; import { MasterModelComp } from "./MasterModel";
import { GameEvent } from "../common/config/GameEvent";
/** 角色实体 */ /** 角色实体 */
@ecs.register(`Hero`) @ecs.register(`Hero`)
@@ -52,7 +53,7 @@ export class Hero extends ecs.Entity {
hv.lv=1 hv.lv=1
this.add(hv); this.add(hv);
this.addComponents<ecs.Comp>(MasterModelComp) this.addComponents<ecs.Comp>(MasterModelComp)
console.log("[Hero]:master",hv) oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid})
} }
/** 加载角色 */ /** 加载角色 */
@@ -75,9 +76,7 @@ export class Hero extends ecs.Entity {
// const move = this.get(BattleMoveComp); // const move = this.get(BattleMoveComp);
// move.direction = 1; // 向右移动 // move.direction = 1; // 向右移动
// move.targetX = 800; // 右边界' // move.targetX = 800; // 右边界'
oops.message.dispatchEvent("hero_load",this) oops.message.dispatchEvent(GameEvent.FriendCalled,{uuid:uuid})
console.log("[Hero]:friend",hv)
} }
hero_init(uuid:number=1001,node:Node,info:any={ap:0,hp:0,lv:1,crit:0,crit_d:0,dod:0,dod_no:false,crit_no:false}) { hero_init(uuid:number=1001,node:Node,info:any={ap:0,hp:0,lv:1,crit:0,crit_d:0,dod:0,dod_no:false,crit_no:false}) {
var hv = node.getComponent(HeroViewComp)!; var hv = node.getComponent(HeroViewComp)!;

View File

@@ -215,6 +215,7 @@ export class HeroViewComp extends CCComp {
this.ap += Math.floor(ap/100*this.ap); this.ap += Math.floor(ap/100*this.ap);
} }
this.BUFFCOMP.vmdata_update() this.BUFFCOMP.vmdata_update()
oops.message.dispatchEvent(GameEvent.APChange,{fac:this.fac})
} }
de_ap(ap: number,is_num:boolean=true){ de_ap(ap: number,is_num:boolean=true){

View File

@@ -1,4 +1,4 @@
import { _decorator, Label, Node, ProgressBar, tween, v3 } from "cc"; import { _decorator, Label, Node, ProgressBar, resources, Sprite, SpriteAtlas, tween, v3 } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { ButtonTouchLong } from "../../../../extensions/oops-plugin-framework/assets/libs/gui/button/ButtonTouchLong"; import { ButtonTouchLong } from "../../../../extensions/oops-plugin-framework/assets/libs/gui/button/ButtonTouchLong";
@@ -8,6 +8,8 @@ import { HeroViewComp } from "../hero/HeroViewComp";
import { HeroModelComp } from "../hero/HeroModelComp"; import { HeroModelComp } from "../hero/HeroModelComp";
import { MasterModelComp } from "../hero/MasterModel"; import { MasterModelComp } from "../hero/MasterModel";
import { FriendModelComp } from "../hero/FriendModel"; import { FriendModelComp } from "../hero/FriendModel";
import { HeroInfo } from "../common/config/heroSet";
import { FacSet } from "../common/config/BoxSet";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -22,7 +24,8 @@ export class BarCompComp extends CCComp {
protected onLoad(): void { protected onLoad(): void {
this.on(GameEvent.FightReady,this.readay,this) this.on(GameEvent.FightReady,this.readay,this)
this.on(GameEvent.FriendCalled,this.friend_called,this) this.on(GameEvent.FriendCalled,this.friend_called,this)
this.on(GameEvent.MasterCalled,this.master_called,this)
this.on(GameEvent.APChange,this.ap_change,this)
} }
start() { start() {
@@ -36,10 +39,43 @@ export class BarCompComp extends CCComp {
this.node.getChildByName("bar").getChildByName("more").active=false this.node.getChildByName("bar").getChildByName("more").active=false
this.node.getChildByName("fbar").getChildByName("more").active=false this.node.getChildByName("fbar").getChildByName("more").active=false
} }
private friend_called(){ private master_called(e:any,data:any){
this.node.getChildByName("fbar").active=true this.node.getChildByName("bar").active = true
let show=this.node.getChildByName("bar").getChildByName("hero")
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = show.getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[data.uuid].path);
});
} }
private friend_called(e:any,data:any){
this.node.getChildByName("fbar").active=true
let show=this.node.getChildByName("fbar").getChildByName("hero")
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = show.getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[data.uuid].path);
});
}
private ap_change(e:any,data:any){
console.log("[barcomp]:ap_change",data)
if(data.fac==FacSet.HERO){
let barNode = this.node.getChildByName("bar").getChildByName("ap").getChildByName("val")
tween(barNode).to(0.2, {scale:v3(1.5,1.5,1)},{
onComplete:()=>{
tween(barNode).to(0.1, {scale:v3(1,1,1)}).start()
}
}).start()
}else{
let barNode = this.node.getChildByName("fbar").getChildByName("ap").getChildByName("val")
tween(barNode).to(0.2, {scale:v3(1.5,1.5,1)},{
onComplete:()=>{
tween(barNode).to(0.1, {scale:v3(1,1,1)}).start()
}
}).start()
}
}
show_master_more(){ show_master_more(){
let barNode = this.node.getChildByName("bar"); let barNode = this.node.getChildByName("bar");
let node = barNode.getChildByName("more"); let node = barNode.getChildByName("more");

View File

@@ -172,7 +172,7 @@ export class CardsCompComp extends CCComp {
tween().to(0.3, { scale: v3(1, 1, 1) }, { easing: 'backOut' }), tween().to(0.3, { scale: v3(1, 1, 1) }, { easing: 'backOut' }),
tween().to(0.3, { position: v3(0, 640, 0) }, { easing: 'backOut' }) tween().to(0.3, { position: v3(0, 640, 0) }, { easing: 'backOut' })
) )
.start(); .start();
let vip = RandomManager.instance.getRandomInt(0,100) let vip = RandomManager.instance.getRandomInt(0,100)
console.log("[CardsComp]:vip",vip) console.log("[CardsComp]:vip",vip)
if(vip < 30){ if(vip < 30){

View File

@@ -129,7 +129,7 @@ export class EquipSkillComp extends CCComp {
} }
get_skill(e:GameEvent,data:any){ get_skill(e:GameEvent,data:any){
console.log("get_skill") console.log("get_skill",data)
switch(data.slot){ switch(data.slot){
case "skill1": case "skill1":
this.skill1.uuid=data.uuid this.skill1.uuid=data.uuid

View File

@@ -155,6 +155,14 @@ export class MissionComp extends CCComp {
smc.mission.play = true; smc.mission.play = true;
smc.vmdata.mission_data = JSON.parse(JSON.stringify(MissionData)); smc.vmdata.mission_data = JSON.parse(JSON.stringify(MissionData));
this.GlodAddTimer=new Timer(smc.vmdata.mission_data.refrsh_time) this.GlodAddTimer=new Timer(smc.vmdata.mission_data.refrsh_time)
this.hide_call_friend()
this.hide_skill_get(null,"skill1")
this.hide_skill_get(null,"skill2")
this.hide_skill_get(null,"skill3")
this.hide_skill_change(null,"skill1")
this.hide_skill_change(null,"skill2")
this.hide_skill_change(null,"skill3")
} }
//角色初始化 //角色初始化
@@ -200,8 +208,9 @@ export class MissionComp extends CCComp {
mission_data.gold-=(mission_data.refresh_gold+mission_data.buff_refresh_gold) mission_data.gold-=(mission_data.refresh_gold+mission_data.buff_refresh_gold)
} }
call_skill_card(e:any){ call_skill_card(e:any,data:any){
oops.message.dispatchEvent(GameEvent.HeroSkillSelect,{slot:e}) console.log("call_skill_card",e)
oops.message.dispatchEvent(GameEvent.HeroSkillSelect,{slot:data})
} }
private cleanComponents() { private cleanComponents() {
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()}); ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});

View File

@@ -134,7 +134,6 @@ export class MissionHeroCompComp extends CCComp {
let scale = 1 let scale = 1
let pos:Vec3 = HeroPos[freind_pos].pos; let pos:Vec3 = HeroPos[freind_pos].pos;
hero.load(pos,scale,uuid,info,freind_pos); hero.load(pos,scale,uuid,info,freind_pos);
oops.message.dispatchEvent(GameEvent.FriendCalled)
} }
get_info_and_remove(fight_pos:number,uuid:number){ get_info_and_remove(fight_pos:number,uuid:number){

View File

@@ -34,9 +34,11 @@
- [x] 广告拿紫色品质, 紫色品质 一定几率出现,出现后 10秒后消失 - [x] 广告拿紫色品质, 紫色品质 一定几率出现,出现后 10秒后消失
- [ ] 装备设定,借助AI,各品质装备 属性相差20% , - [ ] 装备设定,借助AI,各品质装备 属性相差20% ,
- [ ] 添加玩家自主 激活额外boss 按钮,额外boss 有特殊事件 - [ ] 添加玩家自主 激活额外boss 按钮,额外boss 有特殊事件
- [ ] 主将信息面板 - [x] 主将信息面板
- [ ] 伙伴信息面板 - [ ] 伙伴信息面板
- [ ] boss信息面板 - [ ] boss信息面板
- [ ] 金币掉落 动画 从头顶掉到底部bar
- [x] 技能和伙伴都 需要主动点击 才会弹出,特定回合出现选项