src/CaveEntrance.js
/**
 * A shrapnel from an explosion.
 *
 * @param {GameParticle} b
 * @param {ImageHandle} img
 * @param {Vec2} off
 */
A shrapnel from an explosion.
A shrapnel from an explosion .
function Shrapnel(b, img, off) {
	img = img || null;
	off = off || new Vec2(0, 0);
	GameParticle.call(this);
	this.offset = off;
	this.angle = 0;
	this.image = img;
	this.velocity = new Vec2(randomRange(-100, 100), randomRange(-200, -150));
	this.angularVelocity = randomRange(-3 * Math.PI, 3 * Math.PI);
	this.base = b;
	this.splashInSound = null;
	this.splashOutSound = null;
	this.splashAnim = null;
	this.splashOutAnim = null;
}
function Shrapnel ( b , img , off ) { img = img || null ; off = off || new Vec2 ( 0 , 0 ) ; GameParticle . call ( this ) ; this . offset = off ; this . angle = 0 ; this . image = img ; this . velocity = new Vec2 ( randomRange ( - 100 , 100 ) , randomRange ( - 200 , - 150 ) ) ; this . angularVelocity = randomRange ( - 3 * Math . PI , 3 * Math . PI ) ; this . base = b ; this . splashInSound = null ; this . splashOutSound = null ; this . splashAnim = null ; this . splashOutAnim = null ; }
A shrapnel from an explosion.
A shrapnel from an explosion .