Mercurial > hg > Members > tkaito > task_dandy
comparison schedule.cc @ 8:7c60ef3fca5b
test
author | tkaito |
---|---|
date | Wed, 07 Jul 2010 03:11:52 +0900 |
parents | c015109a6041 |
children | dea6d34c8e91 |
comparison
equal
deleted
inserted
replaced
7:c015109a6041 | 8:7c60ef3fca5b |
---|---|
6 SceneGraphPtr node, void *sgroot_); | 6 SceneGraphPtr node, void *sgroot_); |
7 | 7 |
8 void | 8 void |
9 schedule(SceneGraphPtr node, void *sgroot_, int w, int h) | 9 schedule(SceneGraphPtr node, void *sgroot_, int w, int h) |
10 { | 10 { |
11 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; | |
12 Pad *pad = sgroot->getController(); | |
13 if(back_property.flag == 0){ | |
14 if(pad->start.isPush()) { | |
15 back_property.flag = 1; | |
16 //node->children->remove(); | |
17 sgroot->setSceneData(node); | |
18 } | |
19 } | |
20 | |
21 if(back_property.flag == 1) { | |
11 switch (node->frame) { | 22 switch (node->frame) { |
12 case 1: | 23 case 1: |
13 break; | 24 break; |
14 case FRAME_RATE * 2: | 25 case FRAME_RATE * 10: |
15 Putenemy(1, w/2, 0, 2, 4, MOVE_00, MOVE_00, node, sgroot_); | 26 Putenemy(1, w/2, 0, 2, 4, MOVE_00, MOVE_00, node, sgroot); |
16 break; | 27 break; |
17 case FRAME_RATE * 3: | 28 case FRAME_RATE * 20: |
18 Putenemy(1, w/3, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot_); | 29 Putenemy(1, w/3, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot); |
19 Putenemy(1, w/2, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot_); | 30 Putenemy(1, w/2, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot); |
20 break; | 31 break; |
21 /* | 32 /* |
22 case FRAME_RATE * 4: | 33 case FRAME_RATE * 4: |
23 Putenemy(1, 120, -128, 0, 4, chara_state0); | 34 Putenemy(1, 120, -128, 0, 4, chara_state0); |
24 break; | 35 break; |
223 } | 234 } |
224 Putenemy(4, 520, -128, 0, 1, chara_state8); // 1面ボスをPutenemy | 235 Putenemy(4, 520, -128, 0, 1, chara_state8); // 1面ボスをPutenemy |
225 } | 236 } |
226 */ | 237 */ |
227 } | 238 } |
239 } | |
228 } | 240 } |
229 | 241 |
230 ObjProperty enemy[300]; | 242 ObjProperty enemy[300]; |
231 ObjPropertyPtr e; | 243 ObjPropertyPtr e; |
232 | 244 |
240 | 252 |
241 enemy1->xyz[0] = e->x; | 253 enemy1->xyz[0] = e->x; |
242 enemy1->xyz[1] = e->y; | 254 enemy1->xyz[1] = e->y; |
243 | 255 |
244 back1->addChild(enemy1); | 256 back1->addChild(enemy1); |
245 | 257 |
246 } | 258 } |
247 | 259 |
248 void | 260 void |
249 Putenemy(int charano, int x, int y, int sx, int sy, int move, int coll, | 261 Putenemy(int charano, int x, int y, int sx, int sy, int move, int coll, |
250 SceneGraphPtr node, void *sgroot_) | 262 SceneGraphPtr node, void *sgroot_) |
270 e->vital = charactor[charano].vital; | 282 e->vital = charactor[charano].vital; |
271 //e->move = move; | 283 //e->move = move; |
272 e->score = charactor[charano].score; | 284 e->score = charactor[charano].score; |
273 //e->dt1 = e->dt2 = 0; | 285 //e->dt1 = e->dt2 = 0; |
274 //e->tama = tf; | 286 //e->tama = tf; |
275 | 287 |
276 obj->xyz[0] = x; | 288 obj->xyz[0] = x; |
277 obj->xyz[1] = y; | 289 obj->xyz[1] = y; |
278 obj->stack_xyz[0] = sx; | 290 obj->stack_xyz[0] = sx; |
279 obj->stack_xyz[1] = sy; | 291 obj->stack_xyz[1] = sy; |
280 | 292 |
281 int size = sizeof(ObjPropertyPtr); | 293 int size = sizeof(ObjPropertyPtr)*16; |
282 //obj->set_move_collision(move, coll); | 294 //obj->set_move_collision(move, coll); |
283 sgroot->set_game_task(move, e, size, create_enemy); | 295 sgroot->set_game_task(move, e, size, create_enemy); |
284 | 296 |
285 node->addChild(obj); | 297 //node->addChild(obj); |
286 | 298 //node->setSceneData(); |
287 } | 299 } |