Jump to content

is tweening > The documentation is really not well done


espace
 Share

Recommended Posts

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)> no
isTweening(this)> no
this.isTweening> no
this.isTweening()> no

Frankly 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

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:

Screen Shot 2017-01-26 at 8.35.30 AM.png

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

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:

Screen Shot 2017-01-26 at 8.35.30 AM.png

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...