Mercurial > hg > Game > Cerium
annotate Renderer/Test/game_over.cc @ 563:338ad9c856fc draft
all exmple on Mac OS X
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 23:05:16 +0900 |
parents | 4c5264373c51 |
children | 7a311860a76e |
rev | line source |
---|---|
539 | 1 #include "SceneGraphRoot.h" |
2 #include "vacuum.h" | |
3 | |
4 | |
5 void | |
6 gameover_scene(int w,int h,SceneGraphPtr node) | |
7 { | |
8 | |
9 SceneGraphPtr over; | |
10 | |
563
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
11 over = sgroot->createSceneGraph("GAMEOVER"); |
539 | 12 over->xyz[0] = w/2; |
13 over->xyz[1] = h/2; | |
14 over->set_move_collision(gameover_idle,gameover_collision); | |
15 node->addBrother(over); | |
16 } | |
17 | |
18 void | |
19 gameover_idle(SceneGraphPtr node,int screen_w,int screen_h) | |
20 { | |
21 } | |
22 | |
23 void | |
24 gameover_collision(SceneGraphPtr node,int screen_w,int screen_h,SceneGraphPtr tree) | |
25 { | |
26 | |
27 Pad *pad = sgroot->getController(); | |
28 | |
29 if(pad->start.isPush()) { | |
30 | |
31 SceneGraphPtr title; | |
32 | |
563
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
33 title = sgroot->createSceneGraph("TITLE"); |
539 | 34 title->xyz[0] = screen_w/2; |
35 title->xyz[1] = screen_h/2; | |
36 title->set_move_collision(no_move_idle, title_collision); | |
37 sgroot->setSceneData(title); | |
38 | |
39 } | |
40 | |
41 } |