comparison game_scene01.cc @ 3:dca6d5d2ef46

stage 1 add
author tkaito
date Sun, 06 Jun 2010 05:23:51 +0900
parents
children e089ac9ea221
comparison
equal deleted inserted replaced
2:69b4108bf4e8 3:dca6d5d2ef46
1 #include "game_scene01.h"
2
3 void
4 create_object(void *sgroot_, int w, int h)
5 {
6 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
7 SceneGraphPtr dandy, rdandy, rtdandy, ldandy, ltdandy;
8 //SceneGraphPtr tmp[5] = {ldandy, ltdandy, dandy, rtdandy, rtdandy};
9 //dandys = tmp;
10
11 SceneGraphPtr back = sgroot->createSceneGraph();
12
13 dandy = sgroot->createSceneGraph("mydandy");
14 ldandy = sgroot->createSceneGraph("l-dandy");
15 ltdandy = sgroot->createSceneGraph("lt-dandy");
16 rdandy = sgroot->createSceneGraph("r-dandy");
17 rtdandy = sgroot->createSceneGraph("rt-dandy");
18
19 dandy->xyz[0] = w/2;
20 dandy->xyz[1] = h*0.9;
21
22 dandy->set_move_collision(dandy_move, dandy_collision);
23 //ldandy->set_move_collision(dandy_move, dandy_collision);
24 ltdandy->set_move_collision(dandy_move, dandy_collision);
25 rdandy->set_move_collision(dandy_move, dandy_collision);
26 rtdandy->set_move_collision(dandy_move, dandy_collision);
27
28 back->addChild(dandy);
29 sgroot->setSceneData(back);
30 }