This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(spriteBot1.body.velocity.x < 0 && spriteBot1.body.velocity.y < 150 && spriteBot1.body.velocity.y > 0) { | |
//..your code | |
//ex: spriteBot1.animations.play('enm_left'); | |
} else if(spriteBot1.body.velocity.x > 0 && spriteBot1.body.velocity.y < 150 && spriteBot1.body.velocity.y > 0) { | |
//..your code | |
//ex: spriteBot1.animations.play('enm_right'); | |
} else if(spriteBot1.body.velocity.y < 0) { | |
//..your code | |
//ex: spriteBot1.animations.play('enm_up'); | |
} else if(spriteBot1.body.velocity.y > 0) { |