view resources/bullet.js @ 0:0b8d8ce99f46 default tip

commit
author Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
date Mon, 14 Feb 2011 17:06:56 +0900
parents
children
line wrap: on
line source

bullet_move = function(node, sgroot, w, h){
	this.xyz[0] += this.dx;
	this.xyz[1] += this.dy; //+ Math.sin(this.frame) * 500
	this.xyz[2] += this.dz;
	this.frame++;
	if(this.frame > 200){
		this.remove(this);
	}
}

bullet_collision = function(node, sgroot, w, h){
	if(this.xyz[1] > 100){
		this.remove(this);
	}
}