mezerotm Posted July 11, 2018 Share Posted July 11, 2018 I'm fairly new to phaser, been using for about 4 days now, so I have no knowledge of phaser 2 or CE. just phaser 3. I was going over this tutorial which is listed on phaser.io 's website for learning Build a HTML5 game like “Knife Hit” with Phaser 3 using only tweens and trigonometry and in it Emanuele uses tweens, so obviously having no knowledge of tweens I went over to the documentation, to try and figure exactly what they were trying to do. it all checked out fine. But when I saw the code reference 'onComplete' poured over the docs and code for a good bit trying to fine where on earth this was referenced, I finally found out it vaguely referenced it here but doesn't at all talk about the possible callbacks that are available, without having to look at the code directly. I would be kinda interested in knowing if I added documentation myself, and did a pull request would that be accepted with open arms? and if so how would I go about doing that (by this I mean are there some standards or guides already set in place for PR's) If you have been in this situation before in phaser where you felt a specific part of phaser just wasn't well documented enough, please tell me about it, so hopefully I can know where the "trouble" spots are Link to comment Share on other sites More sharing options...
greendot Posted July 11, 2018 Share Posted July 11, 2018 I agree, I faced the exact situation with the same method. I'm new to Phaser as well. I tend to look at the labs page together with the API doc. A sample with a onComplete callback can be found here. Link to comment Share on other sites More sharing options...
samme Posted July 11, 2018 Share Posted July 11, 2018 You just need to learn the JSDoc format and make changes in the right place. Imitate the existing docs. If you step through the tween creation code in the example you should be able to follow the values. It looks like TweenManager#add and Tween#callbacks need further description. Link to comment Share on other sites More sharing options...
Recommended Posts