Mercurial > hg > Members > tkaito > dandy
view game_scene01.cc @ 6:581fa1888e2e
add bullet
author | tkaito |
---|---|
date | Mon, 07 Jun 2010 18:58:59 +0900 |
parents | 57af5c610b34 |
children |
line wrap: on
line source
#include "game_scene01.h" SceneGraphPtr back_; SceneGraphPtr dandys[6]; void create_object(void *sgroot_, int w, int h) { SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; back_ = sgroot->createSceneGraph(); SceneGraphPtr back = back_; /* 自機 */ //SceneGraphPtr dandys[5]; dandys[0] = sgroot->createSceneGraph("l-dandy"); dandys[1] = sgroot->createSceneGraph("lt-dandy"); dandys[2] = sgroot->createSceneGraph("mydandy"); dandys[3] = sgroot->createSceneGraph("rt-dandy"); dandys[4] = sgroot->createSceneGraph("r-dandy"); dandys[5] = sgroot->createSceneGraph("lockon"); dandys[0]->set_move_collision(ldandy_move, dandy_coll); dandys[1]->set_move_collision(ltdandy_move, dandy_coll); dandys[2]->set_move_collision(mydandy_move, mydandy_coll); dandys[3]->set_move_collision(rtdandy_move, dandy_coll); dandys[4]->set_move_collision(rdandy_move, dandy_coll); dandys[5]->set_move_collision(rdandy_move, dandy_coll); for(int i = 0; i < 5; i++) { dandys[i]->xyz[0] = w/2; dandys[i]->xyz[1] = h*0.9; dandys[i]->xyz[2] = 100000.0f; back->addChild(dandys[i]); } back->addChild(dandys[5]); dandys[2]->xyz[2] = 0.0f; /* 敵機 */ SceneGraphPtr gclab; gclab = sgroot->createSceneGraph("green_clab"); gclab->xyz[0] = w/2; gclab->xyz[1] = -100; gclab->xyz[2] = 5; gclab->set_move_collision(gclab_move, gclab_collision); //stage_plan(); back->addChild(gclab); sgroot->setSceneData(back); } void stage_plan() { //TODO : stageの設計。stageも幾つかに分けるべき? }