(function() { "use strict"; var Bird = function(levelData) { this.initialize(levelData); } var p = Bird.prototype = new createjs.Bitmap(); p.Bitmap_initialize = p.initialize; p.initialize = function(levelData) { this.Bitmap_initialize(loader.getResult('img_levelBird')) DragComponent.add(this); MoveComponent.add(this); this.dragFriction = CONST.BIRD_FRICTION; this.dragAllowY = false; this.timeSinceShit = 0; this.moveDirX = -1; this.moveSpeed = 200; this.visible = false; var bounds = this.getBounds(); this.regX = bounds.width/2; this.regY = bounds.height/2; this.x = levelData.birdPosition[0]; this.y = levelData.birdPosition[1]; } window.Bird = Bird; }());