Mercurial > hg > Game > Cerium
diff TaskManager/Test/test_render/ieshoot.cpp @ 206:f5784443dd50 draft
add Camera
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 29 Jan 2009 13:52:47 +0900 |
parents | de235e3ef9d3 |
children | 6602b9ba4bfd |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/ieshoot.cpp Tue Jan 27 18:21:12 2009 +0900 +++ b/TaskManager/Test/test_render/ieshoot.cpp Thu Jan 29 13:52:47 2009 +0900 @@ -56,7 +56,7 @@ iebosstama->set_move_collision(iebosstama_move, ietama_collision); iebosstama->xyz[0] = node->xyz[0]; iebosstama->xyz[1] = node->xyz[1] + boss_radius_y; - iebosstama->xyz[2] = 30000.0f; + //iebosstama->xyz[2] = 50.0f; node->addBrother(iebosstama); damage++; @@ -76,6 +76,7 @@ * Boss が複数居た場合、これじゃ駄目 */ static int x_speed = 5.0f; + static int z_speed = 5.0f; node->xyz[0] += x_speed; @@ -86,6 +87,15 @@ x_speed = -x_speed; node->xyz[0] = screen_w - boss_radius_x; } + + //node->xyz[2] += z_speed; + if (node->xyz[2] >= 100.0f) { + node->xyz[2] = 99.99f; + z_speed = -z_speed; + } else if (node->xyz[2] <= -100.0f) { + node->xyz[2] = -99.99f; + z_speed = -z_speed; + } } static void @@ -194,6 +204,7 @@ iejiki = sgroot->createSceneGraph(IEJIKI); iejiki->set_move_collision(iejiki_move, iejiki_collision); + iejiki->xyz[2] = 20; back->addChild(iejiki); enemy = sgroot->createSceneGraph(IEBOSS);