完成奖品和物品显示,使用oops.gui.open打开物品信息栏 可能还存在问题

This commit is contained in:
pan@work
2024-11-28 10:37:27 +08:00
parent ce0a88988b
commit f32a7e5c47
9 changed files with 754 additions and 382 deletions

View File

@@ -28,21 +28,21 @@ export class VictoryComp extends CCComp {
}
private do_victiry() {
if(this.if_show) return
this.node.getChildByName("Node").setScale(1,1,1)
this.node.setPosition(0,this.node.position.y,0)
this.getReward(true)
this.node.getChildByName("Node").getChildByName("defeat").active = false
this.node.getChildByName("Node").getChildByName("victory").active = true;
}
private do_defeat() {
if(this.if_show) return
this.node.getChildByName("Node").setScale(1,1,1)
this.node.setPosition(0,this.node.position.y,0)
this.getReward(false)
this.node.getChildByName("Node").getChildByName("victory").active = false;
this.node.getChildByName("Node").getChildByName("defeat").active = true
}
getReward(is_victory:boolean){
let conut =2
if(is_victory) conut=1
if(!is_victory) conut=1
let item1=ecs.getEntity<Item>(Item)
let gold: number = Math.floor(RandomManager.instance.getRandomInt((3000 + smc.vmdata.mission.lv * 100) / 3 * 2, 3000 + smc.vmdata.mission.lv * 100));
let parent = this.node.getChildByName("Node").getChildByName("items")
@@ -55,17 +55,17 @@ export class VictoryComp extends CCComp {
}
this.if_show=true
}
do_x10(){
console.log("x10")
this.end_mission()
}
do_x1(){
console.log("x1")
this.end_mission()
}
end_mission(){
this.node.getChildByName("Node").setScale(0,0,0)
this.node.setPosition(2000,this.node.position.y,0)
this.if_show=false
let args:any ={
uuid:1001,
name:"普通攻击石",
info:"一星英雄升星",
num:1
}
}