Mercurial > hg > Members > e085711
diff webGL/dandy/resources/Character_state.js @ 16:527eac9a7d0b
update
author | NOBUYASU Oshiro |
---|---|
date | Sat, 17 Jul 2010 12:56:57 +0900 |
parents | a2b31fe50d9d |
children | 2018ad94fd9b |
line wrap: on
line diff
--- a/webGL/dandy/resources/Character_state.js Sat Jul 17 08:15:28 2010 +0900 +++ b/webGL/dandy/resources/Character_state.js Sat Jul 17 12:56:57 2010 +0900 @@ -376,7 +376,7 @@ } -chara_state20 = function character_state(p) +chara_state20 = function character_state20(p) { p.x += p.vx; p.y += p.vy; @@ -397,34 +397,47 @@ chara_state22 = function character_state22(p) { sf = Math.random() % 4; + sf = parseInt(sf); if((sf == 0) || (sf == 1)) { - p.x = -35; - p.y = Math.random() % (120 - 35); - p.vx = (Math.random() % 4 + 1); - p.vy = Math.random() % 3 + 1; + p.x = -35*d_x; + p.y = Math.random() % (120 - 35)*d_y; + p.vx = (Math.random() % 4 + 1)*d_x; + p.vy = ( Math.random() % 3 + 1 )*d_y; p.state = chara_state23; } if((sf == 2)) { - p.x = Math.random() % 290; - p.y = -30; - p.vx = Math.random() % 3 - 1; - p.vy = (Math.random() % 4 + 1); + p.x = ( Math.random() % 290 )*d_x; + p.y = -30 * d_y; + p.vx = ( Math.random() % 3 - 1 )*d_x; + p.vy = ( (Math.random() % 4 + 1) )*d_y; p.state = chara_state23; } if(sf == 3) { - p.x = 320; - p.y = Math.random() % (120 - 35); - p.vx = (Math.random() % 4 + 1) * -1; - p.vy = Math.random() % 3 -1; + p.x = ( 320 )*d_x; + p.y = ( Math.random() % (120 - 35) )*d_y; + p.vx = ( (Math.random() % 4 + 1) * -1 ) *d_x; + p.vy = ( Math.random() % 3 -1 ) *d_y; p.state = chara_state23; } return p; } +chara_state23 = function character_state32(p) +{ + /*本当はこの 2 行だけ + p=asteroid(p); + return p; + */ + // + p.x += p.vx; + p.y += p.vy; + p.state = chara_state23; + return p; +} chara_state400 = function character_state400(p) {