function Switch() {

}

Switch.prototype = {
  preload: function() {
  },
  create: function() {
    this.add.sprite(0,0, "bg");

    var style = { font: "65px LightUpTheWorld", fill: "#222", align: "center" };
    var text = this.add.text(this.world.centerX, this.world.centerY - 53, "You got " + FingerPuppets.score + " points!\n\nNow give the phone\nto someone else!", style);
    text.anchor.setTo(.5, .5);
    this.add.tween(text).from({alpha: 0, y: "-20" }, 1300, Phaser.Easing.Quartic.Out, true);

    var continueText = this.add.text(this.world.centerX, this.world.centerY + 213, "Touch to continue", style);
    continueText.anchor.setTo(.5, .5);

    this.add.tween(continueText).from({alpha: 0}, 800, Phaser.Easing.Quartic.Out, true, 900);
    this.add.tween(continueText.scale).from({x: 2, y: 2}, 800, Phaser.Easing.Elastic.Out, true, 900);
  },
  update: function() {
    if(this.input.activePointer.justPressed()) {
      this.moveOn();
    }
  },
  moveOn: function() {
    FingerPuppets.score = 0;
    FingerPuppets.numRounds = 0;
    this.game.state.start("hub");
  }
};

module.exports = Switch;