MZuex

Members
  • Content count

    4
  • Joined

  • Last visited

  1. Hi, Am trying to get text data from a JSON file which I've loaded using : this.load.json('textInfo', 'js/textInfo.json '); however, I can't access the data using the code I had working in phaser2 getInfo = JSON.parse(this.cache.getText('textInfo')); and the JSON examples folder on the phaser site is empty, can someone help me out with this please?
  2. Hi guys, Am using phaser3 making a match 3 type game where I need to check the objects that are around other objects. Is there an easy/efficient way to check for objects around a given object or in a given position in phaser3? Any directions or suggestions would be appreciated.
  3. Hi Guys, AM having problems setting up collisions between children of a group I created. I can have have them collide with other gameobjects but not with each other. This is the code I have inside my Create function, am I missing something? create: function () { myObjects = this.physics.add.staticGroup(); var mychildObjects = this.textures.get('myObjects').getFrameNames(); var y=400; for (var i = 0; i < 5; i++) { var x=400; y+=260; for (var j=0; j<5; j++){ var image = this.add.image(x, y, 'myObjects', Phaser.Math.RND.pick(mychildeObjects)); image.setInteractive(); this.input.setDraggable(image); myObjects.add(image); x+=260; } } this.physics.add.overlap(myObjects, myObjects, this.checkCollision, null, this); this.input.on('drag', function (pointer, gameObject, dragX, dragY) { gameObject.x=dragX; gameObject.y=dragY; } ); }, checkCollision:function(object1, object2){ console.log("inside"); object1.destroy(); }