各类弹窗重新设计,使用opps 集成的方式

This commit is contained in:
2024-11-27 17:20:15 +08:00
parent 4ae407bd20
commit 4ba91e95fa
10 changed files with 1870 additions and 292 deletions

View File

@@ -16,6 +16,7 @@ const { ccclass, property } = _decorator;
@ccclass('VictoryComp')
@ecs.register('Victory', false)
export class VictoryComp extends CCComp {
reward_lv:number=1
reward_num:number=2
rerawd_item:any={}
@@ -25,14 +26,14 @@ export class VictoryComp extends CCComp {
}
private do_victiry() {
if(this.if_show) return
this.node.getChildByName("Node").active = true;
this.node.getChildByName("Node").setScale(1,1,1)
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").active = true;
this.node.getChildByName("Node").setScale(1,1,1)
this.getReward(false)
this.node.getChildByName("Node").getChildByName("victory").active = false;
this.node.getChildByName("Node").getChildByName("defeat").active = true
@@ -53,7 +54,7 @@ export class VictoryComp extends CCComp {
this.if_show=true
}
end_mission(){
this.node.getChildByName("Node").active=false
this.node.getChildByName("Node").setScale(0,0,0)
this.if_show=false
}