view paper_shooting/resources/bullet.js @ 27:6468848f4d22 default tip

modified indent
author <e085737>
date Thu, 24 Feb 2011 22:16:46 +0900
parents 158b846e3874
children
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;
    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);
    }
}