dd
This commit is contained in:
@@ -6,6 +6,7 @@ import { smc } from "../common/SingletonModuleComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { ItemComp } from "./ItemComp";
|
||||
import { startGuide } from "../common/config/Guide";
|
||||
import { it } from "node:test";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -36,9 +37,9 @@ export class VictoryComp extends CCComp {
|
||||
this.add_reward(args.rewards)
|
||||
this.rewards=args.rewards
|
||||
}
|
||||
this.node.getChildByName("box").getChildByName("exp").getChildByName("num").getComponent(Label)!.string="x"+this.game_data["exp"].toString()
|
||||
this.node.getChildByName("box").getChildByName("gold").getChildByName("num").getComponent(Label)!.string="x"+this.game_data["gold"].toString()
|
||||
this.node.getChildByName("box").getChildByName("diamond").getChildByName("num").getComponent(Label)!.string="x"+this.game_data["diamond"].toString()
|
||||
this.node.getChildByName("box").getChildByName("items").getChildByName("exp").getChildByName("num").getComponent(Label)!.string="x"+this.game_data["exp"].toString()
|
||||
this.node.getChildByName("box").getChildByName("items").getChildByName("gold").getChildByName("num").getComponent(Label)!.string="x"+this.game_data["gold"].toString()
|
||||
this.node.getChildByName("box").getChildByName("items").getChildByName("diamond").getChildByName("num").getComponent(Label)!.string="x"+this.game_data["diamond"].toString()
|
||||
this.node.getChildByName("title").getChildByName("victory").active=args.victory
|
||||
this.node.getChildByName("title").getChildByName("defeat").active=!args.victory
|
||||
this.node.getChildByName("btns").getChildByName("next").active=false
|
||||
@@ -76,7 +77,14 @@ export class VictoryComp extends CCComp {
|
||||
diamond:0
|
||||
}
|
||||
this.rewards=[]
|
||||
this.node.getChildByName("box").getChildByName("items").removeAllChildren()
|
||||
let items=this.node.getChildByName("box").getChildByName("items")
|
||||
items.children.forEach(element => {
|
||||
if(element.name=="exp"||element.name=="gold"||element.name=="diamond"){
|
||||
element.getChildByName("num").getComponent(Label)!.string="0"
|
||||
}else{
|
||||
element.destroy()
|
||||
}
|
||||
});
|
||||
}
|
||||
//看广告双倍
|
||||
watch_ad(){
|
||||
|
||||
Reference in New Issue
Block a user