targetting arrows shouldUpdate

This commit is contained in:
Mashy 2019-10-28 15:05:30 +10:00
parent 85591ec857
commit 7355f0668f

View File

@ -27,6 +27,16 @@ class TargetSvg extends Component {
}, 500);
}
shouldComponentUpdate(newProps) {
if (newProps.game !== this.props.game) return true;
if (newProps.account !== this.props.account) return true;
if (newProps.animating !== this.props.animating) return true;
if (newProps.animSkill !== this.props.animSkill) return true;
if (newProps.gameEffectInfo !== this.props.gameEffectInfo) return true;
if (newProps.tutorialGame !== this.props.tutorialGame) return true;
return false;
}
render(props, state) {
const { game, account, animating, animSkill, itemInfo, gameEffectInfo, tutorialGame } = props;
const { width, height } = state;