Fix type icon type not updating when types are changed
parent
0f7b55c328
commit
3774b6e214
|
@ -333,6 +333,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
const types = pokemon.getTypes(true);
|
const types = pokemon.getTypes(true);
|
||||||
|
this.type1Icon.setTexture(`pbinfo_${this.player ? 'player' : 'enemy'}_type${types.length > 1 ? '1' : ''}`);
|
||||||
this.type1Icon.setFrame(Type[types[0]].toLowerCase());
|
this.type1Icon.setFrame(Type[types[0]].toLowerCase());
|
||||||
this.type2Icon.setVisible(types.length > 1);
|
this.type2Icon.setVisible(types.length > 1);
|
||||||
if (types.length > 1)
|
if (types.length > 1)
|
||||||
|
|
Loading…
Reference in New Issue