sebashwa / phaser3-plugin-isometric

Feature-packed axonometric plugin for Phaser 3 which stays true to the Phaser API.
https://sebashwa.github.io/phaser3-plugin-isometric
MIT License
172 stars 36 forks source link

Using atlas, can not add frame #17

Open Octagon-X opened 4 years ago

Octagon-X commented 4 years ago

I can not add an "isoSprite" with the correct frame. I am using atlas to load the sprites. Atlas data is loaded correctly. As I can add a normal sprite like this:

this.scene.add.sprite( xx, yy, 'tileset', 'tile1'); Works fine. "tile1" is loaded. Can be done for any other tile.

this.scene.add.isoSprite( xx, yy, 0, 'tileset', 'tile1'); Does not work. TypeError: h.add is not a function.

this.scene.add.isoSprite( xx, yy, 0, 'tileset'); If I remove the frame, then it will always and only load the first frame. This will load "tile1" as it's the first frame.

I have tried any variation and looked at the sourcecode/constructor so I think the example should work.

Also tried an older Version, demo, with phaser 2, where it actually does work like this. this.game.add.isoSprite( State.size * x, State.size * y, 0, 'tileset', Level.groundNames[Level.ground[y][x]], this.groundGroup );

Code from the phaser 2 isometric demo, where this does work. I compared the older version with this, and think that it should work, the way I tried.

Am I missing something? I just can't get this to work, any hints about this?