Jump to content

Phaser classType : isoSprite


PhasedEvolution
 Share

Recommended Posts

Hello. I am trying to create isoSprites instead of normal sprites. I saw this on the phaser docs:

Capturaddr.PNGddddddd.PNG

Then I assume I can't add a Phaser.isoSprite using just game.create().

group_example = game.add.group();
group_example.classType = Phaser.isoSprite;

group_example.create(3,3,"tree");

// in the console it shows an error in one phaser.js lines "var child = new this.classType(this.game, x, y, key, frame);"

//"This object doesn't alllow this action" 

How can I do it then?

Link to comment
Share on other sites

classType would probably be something like Phaser.Plugin.Isometric.IsoSprite.
Not that it would make a difference since it only works if it accepts the same constructor arguments (you're missing 'z').

I'm not sure what you're trying to do?
Use 'new Phaser.Plugin.Isometric.IsoSprite(this.game, x, y, z, key, frame);' for a new IsoSprite.

Link to comment
Share on other sites

3 hours ago, thefailtheory said:

So i have created a pen with some content, i hope it can help

and, the question is : how to do the same pen with PhaserISo ?

http://codepen.io/featuresmega/pen/WGQEaw

and, here is a landscape that is the basic example

http://codepen.io/featuresmega/pen/ZpbZOB

What do you mean by doing the same pen with Phaser?

Link to comment
Share on other sites

5 hours ago, Milton said:

classType would probably be something like Phaser.Plugin.Isometric.IsoSprite.
Not that it would make a difference since it only works if it accepts the same constructor arguments (you're missing 'z').

I'm not sure what you're trying to do?
Use 'new Phaser.Plugin.Isometric.IsoSprite(this.game, x, y, z, key, frame);' for a new IsoSprite.

Well, I was I wasn't sure if there was a difference between using group.create(...) or just use game.add.sprite(...) and then group.add(sprite). Yeah but I guess I can a isoSprite to a group without having to use "create"... 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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