agonya Posted June 12, 2017 Share Posted June 12, 2017 Hi, how can I add a function to the update function when two objects overlapped? I asked similar question yesterday but this time I asked same question in more clear way. For example, I will take a coin and after this my speedPlayer() function will be activated over and over again, infinitely. How can I do this, thanks. Link to comment Share on other sites More sharing options...
simpleyuji Posted June 12, 2017 Share Posted June 12, 2017 update: function() { game.physics.arcade.overlap(player, powerup, function(player, powerup){ speedPlayer(player); }); } Link to comment Share on other sites More sharing options...
agonya Posted June 12, 2017 Author Share Posted June 12, 2017 @simpleyuji thanks for the answer but If I do like this the player will accelerate for just one time. What I want is that the player should accelerate over and over again. Link to comment Share on other sites More sharing options...
Recommended Posts