Im working on a phaser 3 game and what i want to do is have a central file that defines all my variable and preload all my images that arent being defined ive tried so many thing ive probably over looked a lot of options, also i want it to be a class kinda like this
export default class preload extends Phaser.Scene {
constructor() {
super({key:'preload'});
}
//define variable here
const windowWidth = window.innerWidth;
const widnowHeight = window.innerHeight;
preload(){
}
}
So can anyone help?