view paper_shooting/resources/bullet.js @ 25:158b846e3874

paper
author <e085737>
date Mon, 14 Feb 2011 16:37:16 +0900
parents
children 6468848f4d22
line wrap: on
line source

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

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


bullet_move2 = function(node, sgroot, w, h){
	this.xyz[0] += this.dx;
	this.xyz[1] += this.dy;
	this.xyz[2] += this.dz;
	this.frame++;
	if(this.frame > 300){
		this.remove(this);
	}
}

bullet_move3 = function(node, sgroot, w, h){
    this.xyz[0] += this.dx;
    this.xyz[1] += this.dy;
    this.xyz[2] += this.dz;
    if(this.xyz[0] < -200 || this.xyz[1] < -40 || this.xyz[1] > 170 || this.xyz[2] < -300){
        this.remove(this);
    }
}


bullet_collision = function(node, sgroot, w, h){    
}