Jump to content

How to use phaser documention


Pooya72
 Share

Recommended Posts

im new to game development and i began with phaser which seems to be a great framework but i can't understand it's documention very well. Lets talk about phaser groups.

How you understand how to use groups based on the documention ? Examples are clearer but limited they dont cover everything.

Link to comment
Share on other sites

you will get the grip on the docs eventually..  they are easy to read if you already know phaser and how it is structured. for a beginner they are totally confusing.. at least in my opinion..  

 

lets talk for example about something very common..  the physics body..  you probably know that you have to enable it for every sprite by calling    game.physics.p2.enable(somesprite);

 

then you can access it throug somesprite.body

 

if you now want to find out what you can do with the body.. what the available methods and attributes are you go to the docs..  find the menu "physics" chose your system "p2 physics" and then "body"

 

it will then tell you where you are on top of the page: 

Phaser.Physics.P2. Body

everything on the right side (the table) can be used directly on the body.. of course you do not write "Phaser.Physics.P2.Body.angle = 45;"   but "mysprite.body.angle = 45;"

 

 

another approach to the documentation is phaser chains:

http://phaserchains.boniatillo.com/

 

it automatically searches for .. for example "body"  in the docs the moment you start to write "body"

the one very nice thing for beginners is that on the right side (scroll down probably) it shows several use cases of the word body from real code examples from the official examples :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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