misc fix
This commit is contained in:
parent
4fc5f46311
commit
fe956936d1
@ -101,6 +101,7 @@ function animations(props) {
|
|||||||
setAvatarAnimation({
|
setAvatarAnimation({
|
||||||
source: true,
|
source: true,
|
||||||
target: avatarAnimation.target,
|
target: avatarAnimation.target,
|
||||||
|
id: resolution.id,
|
||||||
animTargetId: construct.id,
|
animTargetId: construct.id,
|
||||||
type: 'sourceCast',
|
type: 'sourceCast',
|
||||||
params: { x, y },
|
params: { x, y },
|
||||||
|
|||||||
@ -57,15 +57,14 @@ class ConstructAvatar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const animations = nextProps.avatarAnimation;
|
if (nextProps.avatarAnimation.id === -1) this.animId = 0; // The current set of resolutions ended reset to 0
|
||||||
if (animations.id === -1) this.animId = 0; // The current set of resolutions ended reset to 0
|
if (nextProps.avatarAnimation.id !== this.animId && nextProps.avatarAnimation.animTargetId === this.props.id) {
|
||||||
if (animations.id !== this.animId && animations.animTargetId === this.props.id) {
|
|
||||||
this.animId = nextProps.avatarAnimation.id;
|
this.animId = nextProps.avatarAnimation.id;
|
||||||
const selectAnim = () => {
|
const selectAnim = () => {
|
||||||
switch (animations.type) {
|
switch (nextProps.avatarAnimation.type) {
|
||||||
case 'banish': return banish(this.props.id);
|
case 'banish': return banish(this.props.id);
|
||||||
case 'invert': return invert(this.props.id);
|
case 'invert': return invert(this.props.id);
|
||||||
case 'sourceCast': return sourceCast(this.props.id, animations.params);
|
case 'sourceCast': return sourceCast(this.props.id, nextProps.avatarAnimation.params);
|
||||||
default: return null;
|
default: return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user