(function() { "use strict"; var Creep = function(data) { this.initialize(data); } var p = Creep.prototype = new createjs.Bitmap(); p.speed = null; p.id = null; p.name = null; p.life = null; p.movement = null; p.speed = null; p.xp = null; p.Bitmap_initialize = p.initialize; p.initialize = function(data) { this.Bitmap_initialize(loader.getResult(data.id)); this.hw = this.image.width/2; this.hh = this.image.height/2; this.regX = this.hw; this.regY = this.hh; this.id = data.id; this.name = data.name; this.life = data.life; this.movement = data.movement; this.speed = data.speed; this.xp = data.xp; } p.move = function(fdelta) { this.y -= this.speed*fdelta; } window.Creep = Creep; }());