1 decade ago by niroop
HI, i have two separate entities with separate animation sheets. how can I change the animation of other entity in this entity's update function?
.requires( 'impact.entity', 'game.entities.player2' ) update: function() { var player = ig.game.getEntitiesByType( EntityPlayer2 )[0]; if (this.vel.x > 200) { this.currentAnim = this.anims.disappear; // this is where i need player2's run animation player2.currenAnim = player2.anims.run; } }