Jandeilson Posted March 5, 2014 Share Posted March 5, 2014 Hi everyone!Where "Drag quickly" a sprite of a group for a sprite specifies the same exceeds the set amount of score. I need to drag the sprites of the group quickly without this bug occurs.As I understand the problem is that when you drag the sprite of group quickly the score sometimes is greater than 1, which is the value set for each sprite of group. SOLVED! Link to comment Share on other sites More sharing options...
Jandeilson Posted March 7, 2014 Author Share Posted March 7, 2014 Could anyone help? Link to comment Share on other sites More sharing options...
bilginhalil Posted March 9, 2014 Share Posted March 9, 2014 i have same problem :/ . it seems like administrators don't want to answer. Link to comment Share on other sites More sharing options...
Jandeilson Posted March 10, 2014 Author Share Posted March 10, 2014 The solution I found for my problem was as follows: // Colect Sprite colectSprite: function (character, sprite) { this.score += 1; //My mistake was that I was destroying the sprite before being counted 1 score. Putting a "sprite.kill();" before "if (this.score === 1)..." //A sprite can be destroyed only 1 score is counted. if (this.score === 1) { sprite.kill(); character.kill(); this.game.add.sprite(295, 155, 'character2'); } } It was something like that solved my problem. Emphasize that you need to reset the records every overlap. Link to comment Share on other sites More sharing options...
Recommended Posts