各类弹窗重新设计,使用opps 集成的方式
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user