Mercurial > hg > Members > tkaito > dandy
view game_scene01.cc @ 4:e089ac9ea221
greenclab add. not complete...
author | tkaito |
---|---|
date | Sun, 06 Jun 2010 06:47:45 +0900 |
parents | dca6d5d2ef46 |
children | 57af5c610b34 |
line wrap: on
line source
#include "game_scene01.h" void create_object(void *sgroot_, int w, int h) { SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; //SceneGraphPtr tmp[5] = {ldandy, ltdandy, dandy, rtdandy, rtdandy}; //dandys = tmp; SceneGraphPtr back = sgroot->createSceneGraph(); /* 自機 */ SceneGraphPtr dandy, rdandy, rtdandy, ldandy, ltdandy; dandy = sgroot->createSceneGraph("mydandy"); ldandy = sgroot->createSceneGraph("l-dandy"); ltdandy = sgroot->createSceneGraph("lt-dandy"); rdandy = sgroot->createSceneGraph("r-dandy"); rtdandy = sgroot->createSceneGraph("rt-dandy"); dandy->xyz[0] = w/2; dandy->xyz[1] = h*0.9; dandy->set_move_collision(dandy_move, dandy_collision); ldandy->set_move_collision(dandy_move, dandy_collision); ltdandy->set_move_collision(dandy_move, dandy_collision); rdandy->set_move_collision(dandy_move, dandy_collision); rtdandy->set_move_collision(dandy_move, dandy_collision); /* 敵機 */ SceneGraphPtr gclab; gclab = sgroot->createSceneGraph("green_clab"); gclab->xyz[0] = w/2; gclab->xyz[1] = h/2; gclab->set_move_collision(gclab_move, gclab_collision); //stage_plan(); back->addChild(dandy); back->addChild(gclab); sgroot->setSceneData(back); } void stage_plan() { //TODO : stageの設計。stageも幾つかに分けるべき? }