奖励系统基础完成, todo: 英雄碎片,英雄成长系统
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user