jltjltjlt Posted December 10, 2015 Share Posted December 10, 2015 Not sure why this happens, but spontaneously, say once every 15 loads, my buttons that are using spritesheets load the whole spritesheet instead of one individual frame (like they're supposed to, like they do most of the time). When it happens they still function normally as buttons, they still trigger their function, but the frames don't change on hover and they remain displaying the whole sheet. Attached a screenshot of three buttons in the state I'm talking about. They are supposed to be just the red rings, but the yellow frame is showing. Any ideas? Ever seen this happen before? I looked around but didn't find anyone else with this problem. Link to comment Share on other sites More sharing options...
Kobaltic Posted December 11, 2015 Share Posted December 11, 2015 Posting some code might help. Link to comment Share on other sites More sharing options...
jltjltjlt Posted December 17, 2015 Author Share Posted December 17, 2015 Yeah you're right I'm making them in maybe a weird way ? This is how I create them:(this.markers.select is a method I created and added to the markers group)this.markers = this.add.group();for (var i = 0, j = 3; i < j; i++) { var marker = this.markers.create(0, 0, 'marker', this.markers.select, this, 1, 0, 1, 0); marker.anchor.set(.5,.5); marker.inputEnabled = true; marker.input.useHandCursor = true; this.physics.enable(marker, Phaser.Physics.ARCADE);}And I position them later (x and y are calculated beforehand)this.markers.children.forEach(function(s) { s.position.set(x, y);}); Link to comment Share on other sites More sharing options...
Recommended Posts