507
|
1 #include "SceneGraphRoot.h"
|
|
2 #include "vacuum.h"
|
|
3 #include "SGList.h"
|
|
4
|
|
5
|
|
6 void
|
|
7 gameover_scene(int w,int h,SceneGraphPtr node)
|
|
8 {
|
|
9
|
|
10 SceneGraphPtr over;
|
|
11
|
|
12 over = sgroot->createSceneGraph(GAMEOVER);
|
|
13 over->xyz[0] = w/2;
|
|
14 over->xyz[1] = h/2;
|
|
15 over->set_move_collision(gameover_idle,gameover_collision);
|
|
16 node->addBrother(over);
|
|
17 }
|
|
18
|
|
19 void
|
|
20 gameover_idle(SceneGraphPtr node,int screen_w,int screen_h)
|
|
21 {
|
|
22 }
|
|
23
|
|
24 void
|
|
25 gameover_collision(SceneGraphPtr node,int screen_w,int screen_h,SceneGraphPtr tree)
|
|
26 {
|
|
27
|
|
28 Pad *pad = sgroot->getController();
|
|
29
|
|
30 if(pad->start.isPush()) {
|
|
31
|
|
32 SceneGraphPtr title;
|
|
33
|
|
34 title = sgroot->createSceneGraph(TITLE);
|
|
35 title->xyz[0] = screen_w/2;
|
|
36 title->xyz[1] = screen_h/2;
|
|
37 title->set_move_collision(no_move_idle, title_collision);
|
|
38 sgroot->setSceneData(title);
|
|
39
|
|
40 }
|
|
41
|
|
42 }
|