Jump to content

Search the Community

Showing results for tags 'restart tween'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hey, I have a tween that should start everytime user clicks on object. When tween didn't finish (it has yoyo=true) yet, I want to set its properties to initial ones and start the tween again. I've tried approach from this topic but it's not working : Take a look at my code: in create: this.obj.tween = game.add.tween(this.obj.scale).to({x: 0.5, y: 0.5}, 200, Phaser.Easing.Quadratic.Out, false, 0, 0, true); this.obj.tween.pendingDelete = false; in onClick event: if(this.obj.tween.isRunning) { this.obj.tween.stop(); this.obj.tween.pendingDelete = false; this.obj.scale.setTo(1); this.obj.tween.start(); } else { this.obj.scale.setTo(1); this.obj.tween.start(); } If I click when isRunning == true, then the scale resets to 1 but tween is not starting again - what am I doing wrong? When I set yoyo to false, then my solution is working. Probably some error occurs when the tween is yoyo'ing and I start to stop it.
×
×
  • Create New...