Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Ability to modify Sprite ticks per frame on runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
nachein committed Mar 24, 2017
1 parent 25cf0b7 commit da34046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/native/components/sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da34046

Please sign in to comment.