Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using atlas, can not add frame #17

Open
Octagon-X opened this issue Sep 21, 2020 · 0 comments
Open

Using atlas, can not add frame #17

Octagon-X opened this issue Sep 21, 2020 · 0 comments

Comments

@Octagon-X
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant