Mercurial > hg > Game > Cerium
changeset 628:f7e87789b1dd draft
change gaplan.cc
author | yutaka@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 17 Nov 2009 01:35:12 +0900 |
parents | 2037c8954b9a |
children | 578a2db4a739 30dd8a3deb4a |
files | Renderer/Test/gaplant.cc Renderer/Test/gaplant_action.cc |
diffstat | 2 files changed, 25 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Test/gaplant.cc Tue Nov 17 00:53:09 2009 +0900 +++ b/Renderer/Test/gaplant.cc Tue Nov 17 01:35:12 2009 +0900 @@ -14,14 +14,16 @@ back = sgroot->createSceneGraph(); back->set_move_collision(back_move, back_coll); gaplant = sgroot->createSceneGraph(); - gaplant->xyz[0] = 200; + gaplant->xyz[0] = w / 2; + gaplant->xyz[1] = h / 2; + gaplant->angle[0] = -60; gaplant->angle[1] = 0; gaplant->angle[2] = 0; gaplant->set_move_collision(gaplant_move, gaplant_coll); - int foot = sgroot->getSgid("foot_L_A"); - for (int i = sgroot->getSgid("arm_L_D"); i <= foot; i++) { + int foot = sgroot->getSgid("chest_center_B"); + for (int i = sgroot->getSgid("chest_center_B.074"); i <= foot; i++) { SceneGraphPtr p = sgroot->createSceneGraph(i); gaplant->addChild(p); }
--- a/Renderer/Test/gaplant_action.cc Tue Nov 17 00:53:09 2009 +0900 +++ b/Renderer/Test/gaplant_action.cc Tue Nov 17 01:35:12 2009 +0900 @@ -7,45 +7,45 @@ void move_right(SceneGraphPtr node) { - /*cout << "右を押したんだ " << node->angle[2] << "\n"; - node->angle[2] -= 1; - if (node->angle[2] < -30) { + /*cout << "右を押したんだ " << node->angle[2] << "\n";*/ + node->angle[1] -= 10; + /* if (node->angle[2] < -30) { node->angle[2] = -30; - }*/ - node->xyz[0] += 5; + } + node->xyz[0] += 5;*/ } void move_left(SceneGraphPtr node) { - /*cout << "左を押したんだ " << node->angle[2] << "\n"; - node->angle[1] += 1; - if (node->angle[2] > 30) { + /*cout << "左を押したんだ " << node->angle[2] << "\n";*/ + node->angle[1] += 10; + /* if (node->angle[2] > 30) { node->angle[2] = 30; - }*/ - node->xyz[0] -= 5; + } + node->xyz[0] -= 5;*/ } void move_down(SceneGraphPtr node) { - /*cout << "下だって押したくなる時はある "<< node->angle[0] << "\n"; - node->angle[0] += 1; - if (node->angle[0] > -60) { + /*cout << "下だって押したくなる時はある "<< node->angle[0] << "\n";*/ + node->angle[0] += 10; + /*if (node->angle[0] > -60) { node->angle[0] = -60; - }*/ - node->xyz[1] += 5; + } + node->xyz[1] += 5;*/ } void move_up(SceneGraphPtr node) { - /*cout << "上を押したんだ "<< node->angle[0] << "\n"; - node->angle[0] -= 1; - if (node->angle[0] < -120) { + /*cout << "上を押したんだ "<< node->angle[0] << "\n";*/ + node->angle[0] -= 10; + /*if (node->angle[0] < -120) { node->angle[0] = -120; - }*/ - node->xyz[1] -= 5; + } + node->xyz[1] -= 5;*/ } void