Jump to content

Phaser animation


Recommended Posts


Function create(){
dudes = game.add.group();
 dudes.enableBody = true;

       for (var i = -600; i < 600; i = i + 50){
        for (var y = -800; y < 800; y = y + 50){
        var dude = dudes.create(y,i,'dude');
        dude.frame = 4;
        dude.animations.add('left', [0,1,2,3],10,true);
        dude.body.velocity.x = +50;



This is my code. I would like to see all of the dudes the whole time. Now, they will disappear from the screen after a while. Which code do I have to write so that the code will repeat continuously?

If I have to write something in the function Update(), how do I have to call the dudes?


Link to comment
Share on other sites


  • Recently Browsing   0 members

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