Jump to content

Tween Problem duplicate image


Recommended Posts

create: function(){  





creaNemici: function(){


        this.nemico = game.add.sprite(-100,20,'nemico');


        game.physics.enable(this.nemico, Phaser.Physics.ARCADE);



update: function(){


        game.add.tween(this.nemico).to( { x:game.world.centerX,y:game.world.centerY }, 1300,Phaser.Easing.Linear.None, true);




I have a problem with the tween. I create an image and want it follows the position of an image. To test I set that the enemy has to go in the center of the world, I have done as above by removing the piece of code that was not interested. But I start, the game show two images.


PS: In localhost I see two pictures, but if I do the screenshot, you can not see. is the render?

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...