title: SKSpriteNode replace with SKTexture
body: <p>My problem is that when I play my game, I lose my life even if the enemy does not touch my character, but flies very close to him. I understand that the problem is that the transparent space of my character is in contact with the enemy's transparent space.</p>
  
  <p>I want to do as recommended in the <a href="https://developer.apple.com/documentation/spritekit/skphysicsbody#2852041" rel="nofollow noreferrer">SKPhysicsBody documentation</a>. How can I implement this using my current code?</p>
  
  <pre><code>func madEnemy() {
  
      let randomNumber = Int.random(in: 1..&lt;6)
  
      let enemy = SKSpriteNode(imageNamed: "enemy\(randomNumber)")
  
      enemy.position = CGPoint(
          x: cameraRect.maxX + enemy.size.width/2,
          y: CGFloat.random(
              min: cameraRect.minY + enemy.size.height/2,
              max: cameraRect.maxY - enemy.size.height/2))
      enemy.zPosition = 50
      enemy.name = "enemy"
      addChild(enemy)
  
      let actionMove =
          SKAction.moveBy(x: -(size.width + enemy.size.width), y: 0, duration: 2.0)
      let actionRemove = SKAction.removeFromParent()
      enemy.run(SKAction.sequence([actionMove, actionRemove]))
  }
  </code></pre>