According to phaser.io/tutorials, you can set a initial preload/create function for the game instance:
this.game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create });
However, I'm trying to pass these constructor arguments as an object instead:
SceneContainers.phaserGame = new Phaser.Game({
width: ProjectSettings.resolution[0],
height: ProjectSettings.resolution[1],
type: Phaser.AUTO,
parent: 'content',
backgroundColor: ProjectSettings.backgroundColor,
// 'preload: ...' and 'create: ...' do not exist here
// Also, 'callbacks: ...' does not support 'preload: ...' and 'create: ...'
// according to TypeScript completions.
});
To which property does belong preload/create? When I look at the API docs, I search for preload and nothing shows up: Phaser.Game and Phaser.Types.Core.GameConfig.