Code from the Phaser tutorial "Topdown Games with Tiled" at GameDevAcademy.org