view map/resources/bullet.js @ 20:d322eed6e1c7

add
author <e085737>
date Thu, 13 Jan 2011 21:37:23 +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);
	}
}