clark Posted March 6, 2014 Share Posted March 6, 2014 I have created 2 TweenManagers using the latest Dev Branch and I pass them through my game as references.gameTweenManageruiTweenManagerI want my UI to pause gameTweenManager so I can keep the UI working and pause the game.However, gameTweenManager.pauseAll() does not appear to pause the tweens. What is more, gameTweenManager.getAll().length returns zero even though I see my assets being animated. A typical usage of these tween managers is (for example dealing a card) like this: //setup the tween for itvar tween: Phaser.Tween = this._tweenManager.create(card);tween.to({ x: pos.x, y: pos.y }, 1000, Phaser.Easing.Exponential.Out, true, delay + (cardIndex * 100), false, false);Am I incorrectly using this class? Thanks Link to comment Share on other sites More sharing options...
rich Posted March 6, 2014 Share Posted March 6, 2014 Hmm I'd never considered someone using TweenManager like this It fails because of this line in Tween.js: this._manager = this.game.tweens;So they're always added to the main tween manager, not the one you created. Given all the help you've provided with the typescript defs I'm going to add in this feature for you now Keep an eye on the commit messages. Link to comment Share on other sites More sharing options...
clark Posted March 6, 2014 Author Share Posted March 6, 2014 Thanks Rich you are a gentleman Link to comment Share on other sites More sharing options...
rich Posted March 7, 2014 Share Posted March 7, 2014 Ok see latest push! Let me know if that works for you Link to comment Share on other sites More sharing options...
Recommended Posts