15 Field::Field(std::map<
TAG, boost::shared_ptr<Dungeon>>::iterator dungeonIt,
DEPTH depth) : GameInstance()
17 Dungeon *dungeonPtr = &(*dungeonIt->second);
19 this->dungeonTag = dungeonIt->first;
20 this->width = dungeonPtr->GetBaseSize().GetX();
21 this->height = dungeonPtr->GetBaseSize().GetY();
22 this->generated =
false;
24 if(depth > dungeonPtr->GetMaxDepth() || depth > dungeonPtr->GetMinDepth())
return;
26 squares.resize(this->height);
27 for(y = 0; y < height; y++)
29 for(x = 0; x < width; x++)
31 squares[y].push_back(boost::shared_ptr<Square>(
new Square()));
32 if(Dice::Cast(1, 2) == 2) squares[y][x]->SetFloorTag(dungeonPtr->GetInnerWallFloorTag());
33 else squares[y][x]->SetFloorTag(dungeonPtr->GetFloorFloorTag());
42 this->generated =
true;
55 void Field::WipeData(
void)
88 bool Field::GenerateTrap(std::map<
TAG, boost::shared_ptr<TrapBase>>::iterator trapBaseIt, Coordinates *position)
90 traps.emplace(
traps.end(), boost::make_shared<Trap>(trapBaseIt, position));
std::string TAG
ゲーム要素文字列ID
std::vector< boost::shared_ptr< Door > > doors
ドアインスタンスの配列
std::vector< boost::shared_ptr< Creature > > creatures
クリーチャーインスタンスの配列
標準のシステム インクルード ファイルのインクルード ファイル、または 参照回数が多く、かつあまり変更さ...
std::vector< std::vector< boost::shared_ptr< Square > > > squares
フロアマスの配列
MAP_LENGTH height
フロアの縦サイズ
std::vector< boost::shared_ptr< Item > > items
アイテムインスタンスの配列
std::vector< boost::shared_ptr< Trap > > traps
トラップインスタンスの配列