3
|
1 #include "game_scene01.h"
|
|
2
|
5
|
3 SceneGraphPtr back_;
|
|
4 SceneGraphPtr dandys[5];
|
|
5
|
3
|
6 void
|
|
7 create_object(void *sgroot_, int w, int h)
|
|
8 {
|
|
9 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
|
5
|
10 back_ = sgroot->createSceneGraph();
|
|
11 SceneGraphPtr back = back_;
|
4
|
12
|
|
13 /* 自機 */
|
5
|
14 //SceneGraphPtr dandys[5];
|
|
15 dandys[0] = sgroot->createSceneGraph("l-dandy");
|
|
16 dandys[1] = sgroot->createSceneGraph("lt-dandy");
|
|
17 dandys[2] = sgroot->createSceneGraph("mydandy");
|
|
18 dandys[3] = sgroot->createSceneGraph("rt-dandy");
|
|
19 dandys[4] = sgroot->createSceneGraph("r-dandy");
|
|
20
|
|
21 dandys[0]->set_move_collision(ldandy_move, dandy_coll);
|
|
22 dandys[1]->set_move_collision(ltdandy_move, dandy_coll);
|
|
23 dandys[2]->set_move_collision(mydandy_move, mydandy_coll);
|
|
24 dandys[3]->set_move_collision(rtdandy_move, dandy_coll);
|
|
25 dandys[4]->set_move_collision(rdandy_move, dandy_coll);
|
3
|
26
|
5
|
27 for(int i = 0; i < 5; i++) {
|
|
28 dandys[i]->xyz[0] = w/2;
|
|
29 dandys[i]->xyz[1] = h*0.9;
|
|
30 dandys[i]->xyz[2] = 100000.0f;
|
|
31 back->addChild(dandys[i]);
|
|
32 }
|
|
33
|
|
34 dandys[2]->xyz[2] = 0.0f;
|
4
|
35
|
|
36 /* 敵機 */
|
|
37 SceneGraphPtr gclab;
|
|
38 gclab = sgroot->createSceneGraph("green_clab");
|
|
39
|
|
40 gclab->xyz[0] = w/2;
|
5
|
41 gclab->xyz[1] = -100;
|
|
42 gclab->xyz[2] = 5;
|
3
|
43
|
4
|
44 gclab->set_move_collision(gclab_move, gclab_collision);
|
|
45
|
|
46 //stage_plan();
|
|
47
|
|
48 back->addChild(gclab);
|
3
|
49 sgroot->setSceneData(back);
|
|
50 }
|
4
|
51
|
|
52 void
|
|
53 stage_plan() {
|
|
54 //TODO : stageの設計。stageも幾つかに分けるべき?
|
|
55 }
|