Phaser error on first load of game undefined variables
问题 When I run my game in Google Chrome and Firefox, the game screen is black, once I refresh it, it runs as it should. The error I see in the console when the screen is black is: TypeError: paddle is undefined (Firefox) Uncaught TypeError: Cannot read property 'x' of undefined (Chrome) I also have a warning: Phaser.Loader - active loading canceled / reset (Firefox & Chrome) The relevant part of my code is: var game = new Phaser.Game(800, 560, Phaser.AUTO, 'phaser-canvas', { preload: preload,