NikoFenix

Members
  • Content count

    4
  • Joined

  • Last visited

  1. Problems with animation

    Oh, thank you very much, I've been seeing how to implement it and I do not have it: DDD
  2. Problems with animation

    Hello, it's me again with a new disturbing ... I have an enemy that I declare equal to this example ... But I want to give you animation so that you do not look quiet all the time the object that follows you, any ideas ???
  3. EnemieFollow

    Thank you so much!!
  4. EnemieFollow

    Hello how are you, I'm developing a rpg game and I'm in the development of enemies, in short my problem I have an enemy (spider) that is dedicated to securing the player, but I can only ahcer follow the mouse, some solution ? My code is PRELOAD < game.load.image('ball', 'Multimedia/Imagenes/Personajes/spider.png'); > CREATE game.physics.startSystem(Phaser.Physics.ARCADE); balls = game.add.group(); balls.enableBody = true; for (var i = 0; i < 50; i++) { var ball = balls.create(game.world.randomX, game.world.randomY, 'ball'); } ------------ HERE IS THE PROBLEM --------------- UPDATE if (w.isDown || a.isDown || s.isDown || d.isDown) { // First is the callback // Second is the context in which the callback runs, in this case game.physics.arcade // Third is the parameter the callback expects - it is always sent the Group child as the first parameter balls.forEach(game.physics.arcade.moveToPointer, game.physics.arcade, true, 200); } else { balls.setAll('body.velocity.x'); balls.setAll('body.velocity.y'); }