PhasedEvolution Posted September 10, 2016 Share Posted September 10, 2016 Hello. I am trying to create isoSprites instead of normal sprites. I saw this on the phaser docs: 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 More sharing options...
Milton Posted September 10, 2016 Share Posted September 10, 2016 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 More sharing options...
nazimboudeffa Posted September 10, 2016 Share Posted September 10, 2016 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 Link to comment Share on other sites More sharing options...
PhasedEvolution Posted September 10, 2016 Author Share Posted September 10, 2016 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 More sharing options...
PhasedEvolution Posted September 10, 2016 Author Share Posted September 10, 2016 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 More sharing options...
nazimboudeffa Posted September 10, 2016 Share Posted September 10, 2016 well i don't know what to do, but i think it's to add the sprite in a PhaserIso way not the just Phaser way, i need more time Link to comment Share on other sites More sharing options...
Recommended Posts