Grandy12 Posted August 19, 2015 Share Posted August 19, 2015 I'm trying to make an enemy have a hit all around himself, so that he can use a suicide explosion attack if the player gets too close. I decided the best way to do it was to create another, bigger sprite around him, then add it as a child so it follows him around, and check if it overlaps with the player. Only as soon as I add it as a child, it disappears. Debugging it's body returns nothing, and it doesn't seem to have an x or y coordinates at all. The code so far was_explosionArea = this.game.add.sprite(_posix,_posiy,'bomb')bombEnemy.addChild(_explosionArea);_explosionArea.anchor.setTo(0.5, 0.5);_explosionArea.scale.setTo(2.75, 2.75)this.game.physics.arcade.enable(_explosionArea)_explosionArea.enableBody = true; Link to comment Share on other sites More sharing options...
Recommended Posts