mmm ok, I think i might understand, so if i have a function declared in extend: {} I can refer to it using this. ?
I am trying to create a player function, which I think i need to use this extend for (dont have the function working yet, but is this how it should be done? The class I am trying to use is below
createPlayer = function(x, y, key, game)
{
this.player = this.physics.add.sprite(game, x, y, key);
this.health = 100;
return player;
}
and i can call it using
player = new createPlayer(200, 500, 'player', game);