deep.js
// origin, so that multiple turrets facing the same direction can exist on one entity.

origin, so that multiple turrets facing the same direction can exist on one entity.
origin so that multiple turrets facing the same direction can exist on one entity .
function Draw_Turret_II(gx, gy, fOff, fLen, fWid, fRecoil, aRotation, fInjury)
{
	fRecoil *= Zoom_Fctr;
	var sp = ptos(gx, gy);
	context.save();
	context.translate(sp.x, sp.y);
	context.rotate(aRotation * Math.PI / 180.0);
	context.translate(0 - sp.x, 0 - sp.y);
	context.beginPath();
	context.fillStyle = Make_Color(_TF.r, _TF.g, _TF.b);
	context.fillRect(sp.x - fWid / 2 - fOff, sp.y, fWid, fLen - fRecoil, fWid * 2);
	if (fInjury > 0)
	{
		context.fillStyle = Make_Color_Ex(255, 0, 0, fInjury);
		context.fillRect(sp.x - fWid / 2 - fOff, sp.y, fWid, fLen - fRecoil, fWid * 2);
	}
	context.strokeStyle = Make_Color(_TB.r, _TB.g, _TB.b);
	context.lineWidth = 3.0 * Zoom_Fctr;
	context.lineJoin = "round";
	context.rect(sp.x - fWid / 2 - fOff, sp.y, fWid, fLen - fRecoil, fWid * 2);
	context.stroke();
	if (fInjury > 0)
	{
		context.strokeStyle = Make_Color_Ex(255, 0, 0, fInjury);
		context.stroke();
	}
	context.closePath();
	context.restore();
}
function Draw_Turret_II ( gx , gy , fOff , fLen , fWid , fRecoil , aRotation , fInjury ) { fRecoil *= Zoom_Fctr ; var sp = ptos ( gx , gy ) ; context . save ( ) ; context . translate ( sp . x , sp . y ) ; context . rotate ( aRotation * Math . PI / 180.0 ) ; context . translate ( 0 - sp . x , 0 - sp . y ) ; context . beginPath ( ) ; context . fillStyle = Make_Color ( _TF . r , _TF . g , _TF . b ) ; context . fillRect ( sp . x - fWid / 2 - fOff , sp . y , fWid , fLen - fRecoil , fWid * 2 ) ; if ( fInjury > 0 ) { context . fillStyle = Make_Color_Ex ( 255 , 0 , 0 , fInjury ) ; context . fillRect ( sp . x - fWid / 2 - fOff , sp . y , fWid , fLen - fRecoil , fWid * 2 ) ; } context . strokeStyle = Make_Color ( _TB . r , _TB . g , _TB . b ) ; context . lineWidth = 3.0 * Zoom_Fctr ; context . lineJoin = "round" ; context . rect ( sp . x - fWid / 2 - fOff , sp . y , fWid , fLen - fRecoil , fWid * 2 ) ; context . stroke ( ) ; if ( fInjury > 0 ) { context . strokeStyle = Make_Color_Ex ( 255 , 0 , 0 , fInjury ) ; context . stroke ( ) ; } context . closePath ( ) ; context . restore ( ) ; }
origin, so that multiple turrets facing the same direction can exist on one entity.
origin so that multiple turrets facing the same direction can exist on one entity .