Mercurial > hg > Members > e085737 > sample
diff vacuum_new/resources/vacuum.js @ 10:ea99603c6099
add_comment
author | <e085737> |
---|---|
date | Sun, 05 Dec 2010 10:37:49 +0900 |
parents | 182428b3aee8 |
children |
line wrap: on
line diff
--- a/vacuum_new/resources/vacuum.js Sat Dec 04 22:08:22 2010 +0900 +++ b/vacuum_new/resources/vacuum.js Sun Dec 05 10:37:49 2010 +0900 @@ -12,7 +12,7 @@ vacuum_coll = function(node, sgroot, screen_w, screen_h){ - const ENCOUNT = 100 + const ENCOUNT = 100 var pad = new sgroot.getController() if(node.frame%ENCOUNT == ENCOUNT-1){ if(Math.random() < 0.5){ @@ -59,6 +59,8 @@ if(near_enemy != null){ near_enemy.stack_xyz[2] = 1 var lockon = sgroot.createSceneGraph2("LOCK") + lockon.xyz[0] = near_enemy.xyz[0] + lockon.xyz[1] = near_enemy.xyz[1] lockon.set_move_collision(no_move_idle, lockon_collision) near_enemy.addChild(lockon) } @@ -106,7 +108,6 @@ add_cubecollision_object = function(id, root, w, h, sgroot){ - //var common_move = new sgroot.createSceneGraph3() var cube_object = new sgroot.createSceneGraph1(id) cube_object.xyz[0] = Math.random()*w cube_object.xyz[1] = Math.random()*h @@ -121,7 +122,7 @@ sgroot.createFromXMLfile(gl, "./xml/gamecube.xml"); sgroot.createFromXMLfile(gl, "./xml/title.xml"); - title = new sgroot.createSceneGraph1("TITLE") + var title = new sgroot.createSceneGraph1("TITLE") title.xyz[0] = w/2 title.xyz[1] = h/2 title.set_move_collision(no_move_idle, title_collision)