PlayState = {};

PlayState.preload = function() {
  this.game.load.json('level:1', 'data/level01.json');
  this.game.load.image('background', 'images/background.png');
  this.game.load.image('ground', 'images/ground.png');
  this.game.load.image('grass:8x1', 'images/grass_8x1.png');
  this.game.load.image('grass:6x1', 'images/grass_6x1.png');
  this.game.load.image('grass:4x1', 'images/grass_4x1.png');
  this.game.load.image('grass:2x1', 'images/grass_2x1.png');
  this.game.load.image('grass:1x1', 'images/grass_1x1.png');
};

PlayState.create = function() {
  this.game.add.image(0, 0, 'background');
  this._loadLevel(this.game.cache.getJSON('level:1'));
};

PlayState._loadLevel = function(data) {
  data.platforms.forEach(this._spawnPlatform, this);
};

PlayState._spawnPlatform = function(platform) {
  this.game.add.sprite(platform.x, platform.y, platform.image);
};

window.onload = function() {
  let game = new Phaser.Game(960, 600, Phaser.AUTO, 'game');
  game.state.add('play', PlayState);
  game.state.start('play');
};

@@ -1,16 +1,217 @@
+function Hero(game, x, y) %7B%0A  Phaser.Sprite.call(this, game, x, y, 'hero');%0A  this.anchor.set(0.5, 0.5);%0A%7D%0A%0AHero.prototype = Object.create(Phaser.Sprite.prototype);%0AHero.prototype.constructor = Hero;%0A%0A
 PlayState = %7B%7D;%0A
@@ -295,24 +295,25 @@
 l01.json');%0A
+%0A
   this.game.
@@ -355,32 +355,33 @@
 ckground.png');%0A
+%0A
   this.game.load
@@ -723,16 +723,76 @@
 1.png');
+%0A%0A  this.game.load.image('hero', 'images/hero_stopped.png');
 %0A%7D;%0A%0APla
@@ -1015,16 +1015,61 @@
  this);%0A
+  this._spawnCharaters(%7B hero: data.hero %7D);%0A
 %7D;%0A%0APlay
@@ -1108,24 +1108,24 @@
 platform) %7B%0A
-
   this.game.
@@ -1180,16 +1180,163 @@
 e);%0A%7D;%0A%0A
+PlayState._spawnCharaters = function(data) %7B%0A  this.hero = new Hero(this.game, data.hero.x, data.hero.y);%0A  this.game.add.existing(this.hero);%0A%7D;%0A%0A
 window.o

Add main character sprite