Jump to content

How to get an enemy sprite to move left and right along a platform?


Recommended Posts

enemy sprite is different of enemy object..


im saying to do something like this:

EnemyTank = function () {sprites...atributes...etc}EnemyTank.prototype.moveRight(){}EnemyTank.prototype.moveLeft(){}

to move your enemy

this.tank.body.acceleration.x = 200 //moveRightthis.tank.body.acceleration.y = -200 //moveLeft
Link to comment
Share on other sites


  • Recently Browsing   0 members

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