Skip to content

Instantly share code, notes, and snippets.

@gfxblit
Created August 13, 2021 04:50
Show Gist options
  • Save gfxblit/9815cf1fa90cc40c4240277a4cbcd36a to your computer and use it in GitHub Desktop.
Save gfxblit/9815cf1fa90cc40c4240277a4cbcd36a to your computer and use it in GitHub Desktop.
function create() {
this.add.image(400, 300, 'sky');
// Add this code below until the "stop" comment
var platforms = this.physics.add.staticGroup();
platforms
.create(400, 568, 'ground')
.setScale(2)
.refreshBody();
platforms.create(600, 400, 'ground');
platforms.create(50, 250, 'ground');
platforms.create(750, 220, 'ground');
// stop
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment