src/shot.js
/*
 * Component for shots that home in on targets.
 *
 * turnSpeed: Maximum rate of turning (radians / sec)
 */
Component for shots that home in on targets.
turnSpeed: Maximum rate of turning (radians / sec)
Component for shots that home in on targets . turnSpeed : Maximum rate of turning ( radians / sec )
function Homing(turnSpeed) {
	this.hasTarget = false;
	this.period = Math.ceil(param.Rate * 0.2);
	this.rem = 0;
	this.interceptAngle = null;
	this._vec1 = vec2.create();
	this._vec2 = vec2.create();
	this.turnSpeed = turnSpeed;
}
function Homing ( turnSpeed ) { this . hasTarget = false ; this . period = Math . ceil ( param . Rate * 0.2 ) ; this . rem = 0 ; this . interceptAngle = null ; this . _vec1 = vec2 . create ( ) ; this . _vec2 = vec2 . create ( ) ; this . turnSpeed = turnSpeed ; }
Component for shots that home in on targets.
Component for shots that home in on targets .