mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
资源刷新 以及 出售
This commit is contained in:
@@ -41,11 +41,13 @@ export class MainSreepsList extends Component {
|
||||
//添加野怪
|
||||
onAddSreep(sreep:GOnHookPet){
|
||||
this.views.addData(sreep);
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
//删除野怪
|
||||
onDelSreep(sreep:GOnHookPet){
|
||||
this.views.delData(sreep);
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
//刷新
|
||||
@@ -86,6 +88,22 @@ export class MainSreepsList extends Component {
|
||||
app.layer.Open(GUI.Tips,{text:"捕捉成功!"});
|
||||
|
||||
}
|
||||
|
||||
//野怪出售
|
||||
async onClickSell(){
|
||||
|
||||
//获取选中的野怪
|
||||
let item = this.views.getItems<MainSreepsIcon>()[this.index];
|
||||
|
||||
if(!item){
|
||||
app.layer.Open(GUI.Tips,{text:"请选择需要出售的宠物"});
|
||||
return;
|
||||
}
|
||||
|
||||
if(await GOnHookManager.getIns().onSellCreeps(item.data))
|
||||
app.layer.Open(GUI.Tips,{text:"出售成功!"});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user