(function() { "use strict"; var Weapon = function(data) { this.initialize(data); } var p = Weapon.prototype = new createjs.Bitmap(); p.id = null; p.name = null; p.area = null; p.speed = null; p.damage = null; p.cooldown = null; p.ammunition = null; p.data = null; p.heat = null; p.mindepth = null; p.maxdepth = null; p.sounds = null; p.Bitmap_initialize = p.initialize; p.initialize = function(data) { this.Bitmap_initialize(loader.getResult(data.id)); this.regX = this.image.width/2; this.regY = this.image.height/2; this.id = data.id; this.name = data.name; this.area = data.area; this.speed = data.speed; this.damage = data.damage; this.cooldown = data.cooldown; this.ammunition = data.ammunition; this.sounds = data.sounds; this.data = data; this.heat = 0; this.overheat = false; this.mindepth = data.mindepth; this.maxdepth = data.maxdepth; } window.Weapon = Weapon; }());