title: Phaser 3 Creating Class for player
body: <p>I'm working in Phaser 3 using javascript and noticed I had all my code in one class(scene1) which already extends Phaser.Scene</p>
  <p>I was wondering how I could create a class for my player and use it in my scene1 class to create an instance of it, which would help clean up my code like this:</p>
  <pre><code>this.player1 = this.add.sprite(100, 100, &quot;playerImg&quot;, 0)
  this.player1 = this.add.sprite(playerObj.x, playerObj.y, playerObj.image, 0)
  </code></pre>