I have a class Player.js that handles the creation of my player, and I have game.js which is where I run my game. What is the correct way in the game.js to call the Player class?
for example:
let player;
class Game extends Phaser.Scene{
...
create(){
player = this.add.sprite(400,400,'dude');
this.player = new Player(this);
}
my assets are handled in a preload scene. The italics portion is what I'm having problems with. It keeps saying Player is