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

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

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;