539
|
1 #include "SceneGraphRoot.h"
|
|
2 #include "vacuum.h"
|
|
3 #include "SGList.h"
|
|
4
|
|
5 void
|
|
6 title_collision(SceneGraphPtr node, int w, int h,SceneGraphPtr tree)
|
|
7 {
|
|
8
|
|
9 Pad *pad = sgroot->getController();
|
|
10
|
|
11 if(pad->start.isPush()) {
|
|
12
|
|
13 SceneGraphPtr vacuum;
|
|
14 SceneGraphPtr back = sgroot->createSceneGraph();
|
|
15
|
|
16 vacuum = sgroot->createSceneGraph(BIGCUBE);
|
|
17 vacuum->xyz[0] = w/2;
|
|
18 vacuum->xyz[1] = h*0.8;
|
|
19 vacuum->set_move_collision(vacuum_move, vacuum_coll);
|
|
20
|
|
21 back->addChild(vacuum);
|
|
22
|
|
23 add_cubecollision_object(REDCUBE,vacuum,w,h);
|
|
24
|
|
25 sgroot->setSceneData(back);
|
|
26
|
|
27 }
|
|
28 }
|