2
|
1 #include <math.h>
|
|
2 #include "SceneGraphRoot.h"
|
|
3 #include "SGList.h"
|
|
4
|
|
5 static void greenclab_move(SceneGraphPtr node, int screen_w, int screen_h);
|
|
6 static void greenclab_move_idle(SceneGraphPtr node, int screen_w, int screen_h);
|
|
7 static void greenclab_collision(SceneGraphPtr node, int screen_w, int screen_h,
|
|
8 SceneGraphPtr tree);
|
|
9 void create_greenclab(TaskManager *manager, int number);
|
|
10
|
|
11 static void
|
|
12 greenclab_move(SceneGraphPtr node, int w, int h)
|
|
13 {
|
|
14
|
|
15 }
|
|
16
|
|
17 static void
|
|
18 greenclab_move_idle(SceneGraphPtr node, int w, int h)
|
|
19 {
|
|
20 node->xyz[1] += 2.0f;
|
|
21 node->xyz[2] = 0.0f;
|
|
22 }
|
|
23
|
|
24 static void
|
|
25 greenclab_collision(SceneGraphPtr node, int w, int h, SceneGraphPtr tree)
|
|
26 {
|
|
27
|
|
28 }
|
|
29
|
|
30 void
|
|
31 create_greenclab(TaskManager *manager, int w, int h)
|
|
32 {
|
|
33 SceneGraphPtr greenclab;
|
|
34 SceneGraphPtr back;
|
|
35
|
|
36 sgroot->createFromXMLfile(manager, "xml/enemy_greenclab.xml");
|
|
37
|
|
38 back = sgroot->createSceneGraph();
|
|
39 greenclab = sgroot->createSceneGraph(greenclab);
|
|
40 greenclab->xyz[0] = w/2;
|
|
41 greenclab->xyz[1] = 0.0f;
|
|
42 greenclab->set_move_collision(greenclab_move_idle, greenclab_collision);
|
|
43
|
|
44 back->addChild(greenclab);
|
|
45
|
|
46 sgroot->setSceneData(back);
|
|
47 }
|