Jump to content

Questions About Phaser Docs/Javascript


Recommended Posts

I'm an absolute beginner to Phaser and Javascript and I'm following the official tutorial on the website.  I've been trying to learn how to use javascript as well as how to properly use the documentation.  At this part in the tutorial it says:

platforms = game.add.group();
var ground = platforms.create(0,game.world.height-64,'ground');

So to my understanding, in the first line I'm creating a 'platform' group using group() right?  Could I have made a group without using game.add? 

Then I'm making a ground sprite (since create() returns Phaser.Sprite) using group.create().

But the third line confuses me.  create() returns Phaser.Sprite but according to the docs there is no 'scale' property in Sprite.  How am I able to access 'scale'?

Could someone explain this to me?  I may be reading this whole thing wrong or missing something small.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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