Mercurial > hg > Members > tkaito > task_dandy
comparison stage_init.cc @ 27:34fde39c0a31
commit test.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 Dec 2010 02:57:29 +0900 |
parents | 6bea374ee604 a131729d6e4d |
children |
comparison
equal
deleted
inserted
replaced
26:6bea374ee604 | 27:34fde39c0a31 |
---|---|
31 | 31 |
32 return task; | 32 return task; |
33 } | 33 } |
34 | 34 |
35 HTaskPtr | 35 HTaskPtr |
36 pad_free(Viewer *sgroot) | 36 pad_free(SceneGraphRoot *sgroot) |
37 { | 37 { |
38 HTaskPtr task = sgroot->manager->create_task(PAD_FREE); | 38 HTaskPtr task = sgroot->tmanager->create_task(PAD_FREE); |
39 | 39 |
40 task->set_param(0, PAD_INPUT); | 40 task->set_param(0, PAD_INPUT); |
41 task->set_cpu(SPE_ANY); | 41 task->set_cpu(SPE_ANY); |
42 task->spawn(); | 42 task->spawn(); |
43 | 43 |
65 { | 65 { |
66 Viewer *sgroot = sgroot_; | 66 Viewer *sgroot = sgroot_; |
67 SceneGraphPtr root = sgroot->createSceneGraph(); | 67 SceneGraphPtr root = sgroot->createSceneGraph(); |
68 | 68 |
69 SceneGraphPtr title = (SceneGraphPtr)charactor[0].root; | 69 SceneGraphPtr title = (SceneGraphPtr)charactor[0].root; |
70 title->set_move_collision(title_move); | |
70 charactor[0].x = w/2; | 71 charactor[0].x = w/2; |
71 charactor[0].y = h/2; | 72 charactor[0].y = h/2; |
72 charactor[0].vx = 0.0; | 73 charactor[0].vx = 1.0; |
73 charactor[0].vy = 0.0; | 74 charactor[0].vy = 1.0; |
74 charactor[0].flag = 0; | 75 charactor[0].flag = 0; |
75 charactor[0].parent = (void*)root; | 76 charactor[0].parent = (void*)root; |
76 | 77 |
77 title->xyz[0] = charactor[0].x; | 78 title->xyz[0] = charactor[0].x; |
78 title->xyz[1] = charactor[0].y; | 79 title->xyz[1] = charactor[0].y; |
79 title->set_move_collision(title_move); | 80 title->set_move_collision(title_move); |
80 | 81 |
81 pad_alloc(sgroot); | 82 pad_alloc(sgroot); |
82 | |
83 root->addChild(title); | 83 root->addChild(title); |
84 sgroot->setSceneData(root); | 84 sgroot->setSceneData(root); |
85 } | 85 } |