this.toLeft = false;
this.toTop = false;
this.toRight = false;
this.toBottom = false;
this.outArcRadius = Math.sqrt((this.width/2*this.width/2)*2);
if(args){
for(var arg in args){
this[arg] = args[arg];
}
}
}
Sprite.prototype = {
constructor:Sprite,
paint:function(){
if(this.name==="badPlan"){this.update();}
if(this.painter !== undefined && this.visible){
if(this.name!=="badPlan") {
this.update();
}
if(this.name==="plan"||this.name==="missle"||this.name==="badPlan"){
ctx.save();
ctx.translate(this.left , this.top);
ctx.rotate(this.rotateAngle);
this.painter.paint(this);
ctx.restore();
}else {
this.painter.paint(this);
}
}
},
update:function(time){
if(this.behaviors){









