奖励系统基础完成, todo: 英雄碎片,英雄成长系统
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -344,8 +344,8 @@
|
|||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 600,
|
"width": 660,
|
||||||
"height": 600
|
"height": 800
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -450,7 +450,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 194.159,
|
"y": 316.154,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -995,7 +995,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 114.026,
|
"y": 236.021,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -1264,7 +1264,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 283.725,
|
"y": 405.72,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -1400,7 +1400,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 294.161,
|
"y": 416.156,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -1565,8 +1565,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -7.583000000000027,
|
"x": 123.98,
|
||||||
"y": -198.538,
|
"y": -284.652,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -1938,7 +1938,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -150,
|
"x": -150,
|
||||||
"y": -35.061000000000035,
|
"y": 223.281,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -2401,7 +2401,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -35.061000000000035,
|
"y": 223.281,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -2864,7 +2864,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 150,
|
"x": 150,
|
||||||
"y": -35.061000000000035,
|
"y": 223.281,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
|
|||||||
@@ -60,11 +60,9 @@ export class CardControllerComp extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
to_mission(){
|
to_mission(){
|
||||||
oops.message.dispatchEvent("mission_end")
|
|
||||||
this.node.getChildByName("mission_home").active=true
|
this.node.getChildByName("mission_home").active=true
|
||||||
this.node.getChildByName("mission").active=false
|
this.node.getChildByName("mission").active=false
|
||||||
this.node.getChildByName("bar").active=true;
|
this.node.getChildByName("bar").active=true;
|
||||||
|
|
||||||
this.node.getChildByName("hero_home").active=false
|
this.node.getChildByName("hero_home").active=false
|
||||||
this.node.getChildByName("shop_home").active=false
|
this.node.getChildByName("shop_home").active=false
|
||||||
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=true
|
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=true
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ const { ccclass, property } = _decorator;
|
|||||||
@ccclass('MissionComp')
|
@ccclass('MissionComp')
|
||||||
@ecs.register('Mission', false)
|
@ecs.register('Mission', false)
|
||||||
export class MissionComp extends CCComp {
|
export class MissionComp extends CCComp {
|
||||||
VictoryNode: any = null;
|
|
||||||
VictoryComp:any = null;
|
VictoryComp:any = null;
|
||||||
mon_list:any = []
|
mon_list:any = []
|
||||||
call_hero_timer: Timer = new Timer(0.3);
|
call_hero_timer: Timer = new Timer(0.3);
|
||||||
@@ -58,9 +57,7 @@ export class MissionComp extends CCComp {
|
|||||||
|
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
this.VictoryNode=this.node.getChildByName("victory")
|
this.VictoryComp=this.node.getChildByName("victory").getComponent(VictoryComp)
|
||||||
this.VictoryNode.active=false
|
|
||||||
this.VictoryComp=this.VictoryNode.getComponent(VictoryComp)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected update(dt: number): void {
|
protected update(dt: number): void {
|
||||||
@@ -281,10 +278,10 @@ export class MissionComp extends CCComp {
|
|||||||
}
|
}
|
||||||
to_end_mission(){
|
to_end_mission(){
|
||||||
if (smc.vm_data.mission.is_victory){
|
if (smc.vm_data.mission.is_victory){
|
||||||
this.VictoryNode.active=true
|
this.VictoryComp.do_victiry()
|
||||||
}
|
}
|
||||||
if (smc.vm_data.mission.is_defeat){
|
if (smc.vm_data.mission.is_defeat){
|
||||||
this.VictoryNode.active=true
|
this.VictoryComp.do_defeat()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get_mons(){
|
get_mons(){
|
||||||
|
|||||||
@@ -22,25 +22,14 @@ export class VictoryComp extends CCComp {
|
|||||||
rerawd_item:any={}
|
rerawd_item:any={}
|
||||||
/** 视图层逻辑代码分离演示 */
|
/** 视图层逻辑代码分离演示 */
|
||||||
start() {
|
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() {
|
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.node.getChildByName("Node").active = true;
|
||||||
this.getReward()
|
this.getReward()
|
||||||
this.node.getChildByName("Node").getChildByName("defeat").active = false
|
this.node.getChildByName("Node").getChildByName("defeat").active = false
|
||||||
this.node.getChildByName("Node").getChildByName("victory").active = true;
|
this.node.getChildByName("Node").getChildByName("victory").active = true;
|
||||||
}
|
}
|
||||||
private do_defeat() {
|
private do_defeat() {
|
||||||
smc.vm_data.mission.play=false
|
|
||||||
this.node.getChildByName("Node").active = true;
|
this.node.getChildByName("Node").active = true;
|
||||||
this.getReward()
|
this.getReward()
|
||||||
this.node.getChildByName("Node").getChildByName("victory").active = false;
|
this.node.getChildByName("Node").getChildByName("victory").active = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user