装备技能 获取和提示 动画 修改
This commit is contained in:
@@ -24,14 +24,17 @@ export class EquipsComp extends Component {
|
||||
oops.message.on(GameEvent.EquipAdd,this.equip_add,this)
|
||||
oops.message.on(GameEvent.EquipRemove,this.equip_remove,this)
|
||||
this.boxs=this.node.getChildByName("boxs")
|
||||
oops.message.on(GameEvent.EQUIP_SHOW,this.do_equip_show,this)
|
||||
oops.message.on(GameEvent.EQUIP_STONE_UP,this.equip_stone_up,this)
|
||||
|
||||
}
|
||||
do_equip_show(e:GameEvent,data:any){
|
||||
console.log("[EquipsComp]:do_equip_show",data)
|
||||
this.show_equip_get("weapon")
|
||||
this.show_equip_get("armor")
|
||||
this.show_equip_get("accessory")
|
||||
equip_stone_up(e:GameEvent,data:any){
|
||||
console.log("[EquipsComp]:equip_stone_up",data)
|
||||
smc.vmdata.mission_data.equip_stone+=data
|
||||
if(smc.vmdata.mission_data.equip_stone >= smc.vmdata.mission_data.equip_stone_max){
|
||||
this.show_equip_get("weapon")
|
||||
this.show_equip_get("armor")
|
||||
this.show_equip_get("accessory")
|
||||
}
|
||||
}
|
||||
start(){
|
||||
this.fight_ready()
|
||||
@@ -253,20 +256,40 @@ export class EquipsComp extends Component {
|
||||
}
|
||||
|
||||
private show_equip_get(e:string){
|
||||
|
||||
this.boxs.getChildByName(e).getChildByName("get").active =true
|
||||
if(this.weapon.uuid==0){
|
||||
this.boxs.getChildByName("weapon").getChildByName("get").active =true
|
||||
}
|
||||
if(this.armor.uuid==0){
|
||||
this.boxs.getChildByName("armor").getChildByName("get").active =true
|
||||
}
|
||||
if(this.accessory.uuid==0){
|
||||
this.boxs.getChildByName("accessory").getChildByName("get").active =true
|
||||
}
|
||||
}
|
||||
|
||||
private hide_equip_get(e:any,data:string){
|
||||
this.boxs.getChildByName(data).getChildByName("get").active =false
|
||||
this.boxs.getChildByName("weapon").getChildByName("get").active =false
|
||||
this.boxs.getChildByName("armor").getChildByName("get").active =false
|
||||
this.boxs.getChildByName("accessory").getChildByName("get").active =false
|
||||
}
|
||||
|
||||
private show_equip_change(e:string){
|
||||
this.boxs.getChildByName(e).getChildByName("change").active =true
|
||||
if(this.weapon.uuid!=0){
|
||||
this.boxs.getChildByName("weapon").getChildByName("change").active =true
|
||||
}
|
||||
if(this.armor.uuid!=0){
|
||||
this.boxs.getChildByName("armor").getChildByName("change").active =true
|
||||
}
|
||||
if(this.accessory.uuid!=0){
|
||||
this.boxs.getChildByName("accessory").getChildByName("change").active =true
|
||||
}
|
||||
}
|
||||
|
||||
private hide_equip_change(e:any,data:any){
|
||||
this.boxs.getChildByName(data).getChildByName("change").active =false
|
||||
this.boxs.getChildByName("weapon").getChildByName("change").active =false
|
||||
this.boxs.getChildByName("armor").getChildByName("change").active =false
|
||||
this.boxs.getChildByName("accessory").getChildByName("change").active =false
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user