/*
 * Graphics.js
 */

class SpriteNodeAction {
	constructor(active, speed, angle){
		this.mActive	= active ;	// Bool
		this.mSpeed	= speed ;	// Double [m/sec]
		this.mAngle	= angle ;	// Double [radian]
	}
	get active()	{ return this.mActive ;	}
	get speed()	{ return this.mSpeed ;		}
	get angle()	{ return this.mAngle ;		}
}

class SpriteNodeStatus {
	constructor(pos, size){
		this.mPosition	= pos ;		// Point
		this.mSize	= size ;	// Size
	}
	get position()	{ return this.mPosition ;	}
	get size()	{ return this.mSize ;		}
}


/*
 * Graphics.js
 */

class SpriteNodeAction {
	constructor(active, speed, angle){
		checkVariables("SpriteNodeAction.constructor", active, speed, angle) ;
		this.mActive	= active ;	// Bool
		this.mSpeed	= speed ;	// Double [m/sec]
		this.mAngle	= angle ;	// Double [radian]
	}
	get active()	{ return this.mActive ;		}
	get speed()	{ return this.mSpeed ;		}
	get angle()	{ return this.mAngle ;		}

	// toParameter() -> Object
	toParameter() {
		let obj = {
			active:		this.mActive,
			speed: 		this.mSpeed,
			angle: 		this.mAngle
		} ;
		return obj ;
	}
}

class SpriteNodeStatus {
	constructor(pos, size, energy){
		checkVariables("SpriteNodeStatus.constructor", pos, size, energy) ;
		this.mPosition	= pos ;		// Point
		this.mSize	= size ;	// Size
		this.mEnergy	= energy ;	// Double
	}
	get position()	{ return this.mPosition ;	}
	get size()	{ return this.mSize ;		}
	get energy()    { return this.mEnergy ;		}

	// toParameter() -> Object
	toParameter() {
		let obj = {
			position:	this.mPosition,
			size:		this.mSize,
			energy:		this.mEnergy
		} ;
		return obj ;
	}
}


Update built-in JavaScript for sprite node