mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
qqqq
This commit is contained in:
@@ -25,8 +25,6 @@ export class PetIcon extends Component {
|
||||
info:PlayerPetOV;
|
||||
|
||||
onLoad(){
|
||||
this.reset();
|
||||
|
||||
//监听
|
||||
app.event.on(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
|
||||
}
|
||||
@@ -35,13 +33,6 @@ export class PetIcon extends Component {
|
||||
app.event.off(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
|
||||
}
|
||||
|
||||
//初始化
|
||||
reset(){
|
||||
|
||||
this.starNode.active = false;
|
||||
|
||||
}
|
||||
|
||||
//信息更新
|
||||
onUpdateInfo(info:PlayerPetOV){
|
||||
if(this.info && info.petId == this.info.petId){
|
||||
@@ -51,6 +42,9 @@ export class PetIcon extends Component {
|
||||
|
||||
//刷新页面
|
||||
onUpdateView(){
|
||||
|
||||
this.starNode.active = false;
|
||||
|
||||
this.spine.skeletonData = app.battleRes.getRoleSpine(this.info.petTbId);
|
||||
this.spine.setAnimation(0,UIPetAnim.std,true);
|
||||
|
||||
@@ -67,7 +61,6 @@ export class PetIcon extends Component {
|
||||
|
||||
//设置icon
|
||||
set(info:PlayerPetOV){
|
||||
this.reset();
|
||||
this.info = info;
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
Reference in New Issue
Block a user