espace Posted January 25, 2017 Share Posted January 25, 2017 hi, As I already stated in a previous post, I find that the documentation is not very comprehensible.I try to use the function isTweening to see if I have a transition in progress on an object the doc tells me:IsTweening (object) → {boolean} Checks to see if a particular Sprite is currently being tweened. Parameters Name Type Description Object object The object to check for tweens against. Returns Boolean - Returns true if the object is currently tweened, false if not.Having no concrete example of the code, I see that it is under add ()I try therefore with a tween (this.tween):this.tween.isTweening (this)> noisTweening(this)> nothis.isTweening> nothis.isTweening()> noFrankly when looking for something particular in the doc, aside from being a programmer it's really not obvious and not well illustrated. google give me no concret example http://lmgtfy.com/?q=phaser+is+tweening and bontanillo also no more. Am i the only one to think this, thanks for your comments ps: just for illustrate what i explain here i find that this documentation is really well explained and i will be cool if phaser could be like that and sorry for my bad english: https://docs.coronalabs.com/api/library/transition/pause.html I find that phaser is full of possibilities but when I search for something I orient myself more easily to the forum than to the documentation that is not at all available for beginners...too bad Link to comment Share on other sites More sharing options...
samme Posted January 25, 2017 Share Posted January 25, 2017 It is in game.tweens.isTweening() phaser.io/docs/2.6.2/index — see TweenManager. Link to comment Share on other sites More sharing options...
espace Posted January 26, 2017 Author Share Posted January 26, 2017 thanks samme, but how do you read that ? if i read these doc i don't see game.tweens.something ? do you read the source code to find that ? i'm interesting to find the key to use these doc. Link to comment Share on other sites More sharing options...
drhayes Posted January 26, 2017 Share Posted January 26, 2017 Here's isTweening specifically: http://phaser.io/docs/2.6.2/Phaser.TweenManager.html#isTweening The TweenManager, you say? Where's that? From the front page of the docs we see this screenshot: See that "via" column? That tells you (roughly) that the TweenManager is available *via* the "tweens" property on... something. Usually the game instance, often also the current state. Tada! "game.tweens.isTweening". Also, have you seen the doc chains? https://phaser.io/learn/chains You can type "istweening" into the search box and it'll show you where to access it. In this case, the TweenManager (uh, yeah), Phaser.Game.tweens.isTweening (aha!), and Phaser.State.tweens.isTweening (whoa!). ( ; I don't use that chains thing enough. That said, Phaser is open source. If you find a better way to explain something, or find that the docs are lacking somewhere, send a PR! If you found something confusing chances are someone else did, too. The docs don't often explain "why", mostly the "what" and the "how". Link to comment Share on other sites More sharing options...
espace Posted January 26, 2017 Author Share Posted January 26, 2017 4 hours ago, drhayes said: Here's isTweening specifically: http://phaser.io/docs/2.6.2/Phaser.TweenManager.html#isTweening The TweenManager, you say? Where's that? From the front page of the docs we see this screenshot: See that "via" column? That tells you (roughly) that the TweenManager is available *via* the "tweens" property on... something. Usually the game instance, often also the current state. Tada! "game.tweens.isTweening". Also, have you seen the doc chains? https://phaser.io/learn/chains You can type "istweening" into the search box and it'll show you where to access it. In this case, the TweenManager (uh, yeah), Phaser.Game.tweens.isTweening (aha!), and Phaser.State.tweens.isTweening (whoa!). ( ; I don't use that chains thing enough. That said, Phaser is open source. If you find a better way to explain something, or find that the docs are lacking somewhere, send a PR! If you found something confusing chances are someone else did, too. The docs don't often explain "why", mostly the "what" and the "how". Thanks for this explanation. Therefore I will use https://phaser.io/learn/chains it's moore clear for me in term of example code. Regards. Link to comment Share on other sites More sharing options...
Recommended Posts