HTML and CSS Reference
In-Depth Information
Code
Explanation
var wall;
for(i=0;i<walls.length;i++) {
wall = walls[i];
if (intersect(wall.sx,wall.sy,
wall.fx,wall.fy,this.sx,this.sy,
this.rad)) {
this.sx -=dx;
this.sy -=dy;
break;
}
}
}
function Wall(sx,sy,fx,fy,width,stylestring)
{
this.sx = sx;
this.sy = sy;
this.fx = fx;
this.fy = fy;
this.width = width;
this.draw = drawAline;
this.strokestyle = stylestring;
}
function drawAline() {
Search WWH ::




Custom Search