diff --git a/src/components/sprite.js b/src/components/sprite.js index 47f7a52..1791797 100644 --- a/src/components/sprite.js +++ b/src/components/sprite.js @@ -52,7 +52,7 @@ export default class Sprite extends Component { } componentWillReceiveProps(nextProps) { - if (nextProps.state !== this.props.state) { + if (nextProps.state !== this.props.state || nextProps.ticksPerFrame !== this.props.ticksPerFrame) { this.finished = false; this.props.onPlayStateChanged(1); this.context.loop.unsubscribe(this.loopID); diff --git a/src/native/components/sprite.js b/src/native/components/sprite.js index c3f8c2a..1292cb5 100644 --- a/src/native/components/sprite.js +++ b/src/native/components/sprite.js @@ -54,7 +54,7 @@ export default class Sprite extends Component { } componentWillReceiveProps(nextProps) { - if (nextProps.state !== this.props.state) { + if (nextProps.state !== this.props.state || nextProps.ticksPerFrame !== this.props.ticksPerFrame) { this.finished = false; this.props.onPlayStateChanged(1); this.context.loop.unsubscribe(this.loopID);