3
|
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 tmp[5] = {ldandy, ltdandy, dandy, rtdandy, rtdandy};
|
|
8 //dandys = tmp;
|
|
9
|
|
10 SceneGraphPtr back = sgroot->createSceneGraph();
|
4
|
11
|
|
12 /* 自機 */
|
|
13 SceneGraphPtr dandy, rdandy, rtdandy, ldandy, ltdandy;
|
3
|
14 dandy = sgroot->createSceneGraph("mydandy");
|
|
15 ldandy = sgroot->createSceneGraph("l-dandy");
|
|
16 ltdandy = sgroot->createSceneGraph("lt-dandy");
|
|
17 rdandy = sgroot->createSceneGraph("r-dandy");
|
|
18 rtdandy = sgroot->createSceneGraph("rt-dandy");
|
|
19
|
4
|
20 dandy->xyz[0] = w/2;
|
|
21 dandy->xyz[1] = h*0.9;
|
3
|
22
|
|
23 dandy->set_move_collision(dandy_move, dandy_collision);
|
4
|
24 ldandy->set_move_collision(dandy_move, dandy_collision);
|
3
|
25 ltdandy->set_move_collision(dandy_move, dandy_collision);
|
|
26 rdandy->set_move_collision(dandy_move, dandy_collision);
|
|
27 rtdandy->set_move_collision(dandy_move, dandy_collision);
|
4
|
28
|
|
29 /* 敵機 */
|
|
30 SceneGraphPtr gclab;
|
|
31 gclab = sgroot->createSceneGraph("green_clab");
|
|
32
|
|
33 gclab->xyz[0] = w/2;
|
|
34 gclab->xyz[1] = h/2;
|
3
|
35
|
4
|
36 gclab->set_move_collision(gclab_move, gclab_collision);
|
|
37
|
|
38 //stage_plan();
|
|
39
|
|
40 back->addChild(dandy);
|
|
41 back->addChild(gclab);
|
3
|
42 sgroot->setSceneData(back);
|
|
43 }
|
4
|
44
|
|
45 void
|
|
46 stage_plan() {
|
|
47 //TODO : stageの設計。stageも幾つかに分けるべき?
|
|
48 }
|