System.register([], function(exports_1) {
    var Player;
    return {
        setters:[],
        execute: function() {
            Player = (function () {
                function Player(sprite, pad) {
                    var _this = this;
                    this.sprite = sprite;
                    this.pad = pad;
                    this.speed = 2;
                    this.enabled = true;
                    this.setupPlayerAnimations = function (sprite) {
                        sprite.scale.setTo(1.5, 1.5);
                        sprite.animations.add('up', ['01.png', '02.png', '03.png', '04.png'], 6, true, false);
                        sprite.animations.add('down', ['05.png', '06.png', '07.png', '08.png'], 6, true, false);
                        sprite.animations.add('left', ['09.png', '10.png'], 6, true, false);
                        sprite.animations.add('right', ['11.png', '12.png'], 6, true, false);
                        sprite.animations.add('hammer', ['13.png', '14.png', '15.png', '16.png'], 6, false, false);
                        _this.sprite = sprite;
                    };
                    this.setupPlayerRobeAnimations = function (sprite) {
                        sprite.scale.setTo(1.5, 1.5);
                        sprite.animations.add('up', ['05.png', '06.png', '07.png', '08.png'], 6, true, false);
                        sprite.animations.add('down', ['01.png', '02.png', '03.png', '04.png'], 6, true, false);
                        sprite.animations.add('left', ['09.png', '10.png', '11.png', '12.png'], 6, true, false);
                        sprite.animations.add('right', ['13.png', '14.png', '15.png', '16.png'], 6, true, false);
                        sprite.animations.add('dance', ['17.png', '18.png', '19.png'], 6, false, false);
                        _this.sprite = sprite;
                    };
                    this.setupRobeAnimations = function (sprite) {
                        sprite.scale.setTo(1.5, 1.5);
                        sprite.animations.add('down', ['01.png', '02.png', '03.png', '04.png'], 6, true, false);
                        sprite.animations.add('up', ['05.png', '06.png', '07.png', '08.png'], 6, true, false);
                        sprite.animations.add('left', ['09.png', '10.png', '11.png', '12.png'], 6, true, false);
                        sprite.animations.add('right', ['13.png', '14.png', '15.png', '16.png'], 6, true, false);
                        sprite.animations.add('hands_up_down', ['17.png', '18.png', '19.png'], 4, true, false);
                        sprite.animations.add('fall', ['24.png', '25.png'], 2, false, false);
                        sprite.animations.add('naked', ['26.png'], 1, false, false);
                        _this.sprite = sprite;
                    };
                    sprite.smoothed = false;
                    this.setupPlayerAnimations(sprite);
                    this.pad.onRight = function () {
                        if (_this.enabled) {
                            _this.sprite.play('right');
                        }
                    };
                    this.pad.onLeft = function () {
                        if (_this.enabled) {
                            _this.sprite.play('left');
                        }
                    };
                    this.pad.onUp = function () {
                        if (_this.enabled) {
                            _this.sprite.play('up');
                        }
                    };
                    this.pad.onDown = function () {
                        if (_this.enabled) {
                            _this.sprite.play('down');
                        }
                    };
                    this.pad.onStopHold = function () {
                        if (_this.enabled) {
                            _this.sprite.animations.stop();
                        }
                    };
                    this.pad.onRightHold = function () {
                        if (_this.enabled) {
                            _this.sprite.position.add(_this.speed, 0);
                        }
                    };
                    this.pad.onLeftHold = function () {
                        if (_this.enabled) {
                            _this.sprite.position.add(-_this.speed, 0);
                        }
                    };
                    this.pad.onUpHold = function () {
                        if (_this.enabled) {
                            _this.sprite.position.add(0, -_this.speed);
                        }
                    };
                    this.pad.onDownHold = function () {
                        if (_this.enabled) {
                            _this.sprite.position.add(0, _this.speed);
                        }
                    };
                }
                return Player;
            })();
            exports_1("Player", Player);
        }
    }
});
//# sourceMappingURL=Player.js.map