title: Get class who extends SKSpriteNode in didBegin
body: <p>I have a class named <em>Ball</em> who extends <em>SKSpriteNode</em> class:</p>
  <pre><code>import SpriteKit
  
  class Ball: SKSpriteNode {
  
      var score: Int = 0
  
      init([...]){
          [...]
      }
  
      func setScore(score: Int){
          self.score = score;
      }
  
  }
  </code></pre>
  <p>In my <em>GameScene</em>, I detect collisions on my element :</p>
  <pre><code>func didBegin(_ contact: SKPhysicsContact) {
      [...]
  
      // Here I want to call my function in Ball class, but I can't.
      contact.bodyA.node!.setPoints(2);
  
      [...]
  }
  </code></pre>
  <p>How can I call <em>setScore()</em> in <em>didBegin()</em> from <em>contact</em> variable?</p>
  <p>Thanks</p>