code: function() {
  
          // remove the HUD from the game world
          me.game.world.removeChild(this.HUD);
  
          // remove the joypad if initially added
          if (this.virtualJoypad && me.game.world.hasChild(this.virtualJoypad)) {
              me.game.world.removeChild(this.virtualJoypad);
          }
  
          // stop some music
          me.audio.stopTrack("dst-gameforest");
      }
docs: action to perform on state change