metalNumb Posted December 20, 2014 Share Posted December 20, 2014 Hey all. So i have been trying to add some animations to my sprite objects in a group, they appear with velocity as expected, but they won't animate ( and there're no errors ). Here's what i mean.create(){ enemies = this.add.group(); enemies.enableBody = true; enemies.physicsBodyType = Phaser.Physics.ARCADE; enemies.setAll('outOfBoundsKill', true); enemies.setAll('checkWorldBounds', true);function spawnEnemy (){ var enemy = new Enemy (this,'enemy',this.world.width - 50, Math.random() * (this.world.height/2),pixos, ship, floating); enemies.add(enemy); this.add.existing(enemy); enemy.body.velocity.x = Math.random()*(-speedMax+speedMin) - speedMin ;} // SPAWN enemies.callAll('animations.add', 'animations', 'move',[0,1,2,3] ,10, true);enemies.callAll('animations.play', 'animations', 'move');enemyTimer = this.game.time.create(false);enemyTimer.loop(1000, spawnEnemy, this);enemyTimer.start();} // CREATEPlease help ?Thanks ! Link to comment Share on other sites More sharing options...
metalNumb Posted December 21, 2014 Author Share Posted December 21, 2014 UP ! Any help is appreciated, please. Link to comment Share on other sites More sharing options...
Recommended Posts