奖励系统基础完成, todo: 英雄碎片,英雄成长系统

This commit is contained in:
2024-11-21 22:51:09 +08:00
parent 763d327625
commit 15ae8f7f01
5 changed files with 3696 additions and 288 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -344,8 +344,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 600,
"height": 600
"width": 660,
"height": 800
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -450,7 +450,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 194.159,
"y": 316.154,
"z": 0
},
"_lrot": {
@@ -995,7 +995,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 114.026,
"y": 236.021,
"z": 0
},
"_lrot": {
@@ -1264,7 +1264,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 283.725,
"y": 405.72,
"z": 0
},
"_lrot": {
@@ -1400,7 +1400,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 294.161,
"y": 416.156,
"z": 0
},
"_lrot": {
@@ -1565,8 +1565,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -7.583000000000027,
"y": -198.538,
"x": 123.98,
"y": -284.652,
"z": 0
},
"_lrot": {
@@ -1938,7 +1938,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": -150,
"y": -35.061000000000035,
"y": 223.281,
"z": 0
},
"_lrot": {
@@ -2401,7 +2401,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -35.061000000000035,
"y": 223.281,
"z": 0
},
"_lrot": {
@@ -2864,7 +2864,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 150,
"y": -35.061000000000035,
"y": 223.281,
"z": 0
},
"_lrot": {

View File

@@ -60,11 +60,9 @@ export class CardControllerComp extends CCComp {
}
to_mission(){
oops.message.dispatchEvent("mission_end")
this.node.getChildByName("mission_home").active=true
this.node.getChildByName("mission").active=false
this.node.getChildByName("bar").active=true;
this.node.getChildByName("hero_home").active=false
this.node.getChildByName("shop_home").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=true

View File

@@ -33,7 +33,6 @@ const { ccclass, property } = _decorator;
@ccclass('MissionComp')
@ecs.register('Mission', false)
export class MissionComp extends CCComp {
VictoryNode: any = null;
VictoryComp:any = null;
mon_list:any = []
call_hero_timer: Timer = new Timer(0.3);
@@ -58,9 +57,7 @@ export class MissionComp extends CCComp {
}
start() {
this.VictoryNode=this.node.getChildByName("victory")
this.VictoryNode.active=false
this.VictoryComp=this.VictoryNode.getComponent(VictoryComp)
this.VictoryComp=this.node.getChildByName("victory").getComponent(VictoryComp)
}
protected update(dt: number): void {
@@ -281,10 +278,10 @@ export class MissionComp extends CCComp {
}
to_end_mission(){
if (smc.vm_data.mission.is_victory){
this.VictoryNode.active=true
this.VictoryComp.do_victiry()
}
if (smc.vm_data.mission.is_defeat){
this.VictoryNode.active=true
this.VictoryComp.do_defeat()
}
}
get_mons(){

View File

@@ -22,25 +22,14 @@ export class VictoryComp extends CCComp {
rerawd_item:any={}
/** 视图层逻辑代码分离演示 */
start() {
// console.log("VictoryComp start")
oops.message.on("minssion_victory", this.do_victiry, this);
oops.message.on("minssion_defeat", this.do_defeat, this);
console.log("VictoryComp start")
}
private do_victiry() {
smc.vm_data.mission.play=false
if(smc.vm_data.role.mission%10==0){
smc.vm_data.role.mission_finish == true
}else{
smc.vm_data.role.mission += 1
}
this.node.getChildByName("Node").active = true;
this.getReward()
this.node.getChildByName("Node").getChildByName("defeat").active = false
this.node.getChildByName("Node").getChildByName("victory").active = true;
}
private do_defeat() {
smc.vm_data.mission.play=false
this.node.getChildByName("Node").active = true;
this.getReward()
this.node.getChildByName("Node").getChildByName("victory").active = false;