System.register(["../input/Pad"], function(exports_1) {
    var __extends = (this && this.__extends) || function (d, b) {
        for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
    var Pad_1;
    var GameOver;
    return {
        setters:[
            function (Pad_1_1) {
                Pad_1 = Pad_1_1;
            }],
        execute: function() {
            GameOver = (function (_super) {
                __extends(GameOver, _super);
                function GameOver() {
                    _super.apply(this, arguments);
                }
                GameOver.prototype.preload = function () {
                    this.game.load.image('gameover_bg', 'assets/images/gameover_bg.png');
                    this.game.load.audio('end_music', 'assets/music/end.ogg');
                };
                GameOver.prototype.create = function () {
                    this.game.stage.backgroundColor = '#201d1d';
                    this.game.add.sprite(0, 0, 'gameover_bg');
                    this.music = this.game.add.audio('ritual_music');
                    this.music.play();
                    this.game.input.gamepad.start();
                    var pad = new Pad_1.Pad(this.game.input.gamepad.pad1);
                    pad.onThree = function () {
                        window.location.reload();
                    };
                };
                GameOver.prototype.shutdown = function () {
                    this.music.stop();
                };
                return GameOver;
            })(Phaser.State);
            exports_1("GameOver", GameOver);
        }
    }
});
//# sourceMappingURL=GameOver.js.map