Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling play() on fresh paused tween doesn't play it #6005

Closed
MartinEyebab opened this issue Feb 14, 2022 · 3 comments
Closed

Calling play() on fresh paused tween doesn't play it #6005

MartinEyebab opened this issue Feb 14, 2022 · 3 comments

Comments

@MartinEyebab
Copy link

MartinEyebab commented Feb 14, 2022

Version

  • Phaser Version: Phaser v3.60.0 Beta 4
  • Operating system: Windows 10 & iPad OS 15.3

Description

The docs for Tween.play() say "You only need to call this method if you have configured the tween to be paused on creation."
However as demonstrated by the standalone test case below, calling Tween.play() immediately after it was added with scene.tweens.add doesn't actually play the Tween.

Example Test Code

const config = {
  width: 800, 
  height: 600,
  scene: {
    create,
  },
};
const game = new Phaser.Game(config);

function create() {

  const circle = this.add.circle(100,100,20, 0xffffff);
  const tween = this.tweens.add({
    targets: circle,
    alpha: 0,
    duration: 1000,
    paused: true,
  })
  tween.play()
}

Expected result: circle fades away
Actual result: circle doesn't fade away

Additional Information

#5454 might have something to do with it

Edit: Locally undoing the 5454 commit, fixes the issue so the tween plays correctly

@jbromberg
Copy link

Also having this issue.

@Sibert-Aerts
Copy link

Sibert-Aerts commented Jul 10, 2022

+1 on this issue in 3.60 Beta 9

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants