Fix `updateTransform`.

This commit is contained in:
Tipx-L 2023-10-23 21:02:37 -07:00
parent f976299a0e
commit 46dd327887
1 changed files with 6 additions and 7 deletions

View File

@ -30621,6 +30621,9 @@
} }
_status.event.excludeButton.add(this); _status.event.excludeButton.add(this);
} }
get updateTransform(){
return lib.element.Card.prototype.updateTransform;
}
}, },
GameEvent:class{ GameEvent:class{
/** /**
@ -43250,21 +43253,17 @@
//创建身份牌实例 //创建身份牌实例
identityCard:function(identity,position,info,noclick){ identityCard:function(identity,position,info,noclick){
const card=ui.create.card(position,info,noclick); const card=ui.create.card(position,info,noclick);
card._customintro=function(uiintro){ card._customintro=uiintro=>uiintro.add(`${get.translation(`${identity}${2}`)}的身份牌`);
uiintro.add(`${get.translation(identity+2)}的身份牌`);
}
const fileName=`image/card/identity_${identity}.jpg`; const fileName=`image/card/identity_${identity}.jpg`;
new Promise((resolve,reject)=>{ new Promise((resolve,reject)=>{
const image=new Image(); const image=new Image();
image.onload=()=>resolve(); image.onload=resolve;
image.onerror=reject; image.onerror=reject;
image.src=`${lib.assetURL}${fileName}`; image.src=`${lib.assetURL}${fileName}`;
}).then(()=>{ }).then(()=>{
card.classList.add('fullskin'); card.classList.add('fullskin');
card.node.image.setBackgroundImage(fileName); card.node.image.setBackgroundImage(fileName);
}).catch(()=>{ },()=>card.node.background.innerHTML=get.translation(identity)[0]);
card.node.background.innerHTML=get.translation(identity)[0];
});
return card; return card;
}, },
//让卡牌旋转 //让卡牌旋转