view Reserve/resources/bullet.js @ 26:943490f525c5

latest
author <e085737>
date Wed, 16 Feb 2011 22:01:34 +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);
	}
}