本文整理汇总了C++中Door::getDoorId方法的典型用法代码示例。如果您正苦于以下问题:C++ Door::getDoorId方法的具体用法?C++ Door::getDoorId怎么用?C++ Door::getDoorId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Door
的用法示例。
在下文中一共展示了Door::getDoorId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateHouse
void HouseTile::updateHouse(Item* item)
{
if (item->getTile() == this)
{
Door* door = item->getDoor();
if (door && door->getDoorId() != 0)
{
house->addDoor(door);
}
//[ added for beds system
if (!door)
{
BedItem* bed = item->getBed();
if (bed)
{
// next, add it to the house
house->addBed(bed);
}
}
//]
}
}
示例2: updateHouse
void HouseTile::updateHouse(Item* item)
{
if(item->getTile() != this)
return;
Door* door = item->getDoor();
if(door && door->getDoorId())
house->addDoor(door);
else if(BedItem* bed = item->getBed())
house->addBed(bed);
}
示例3: updateHouse
void HouseTile::updateHouse(Item* item)
{
if(item->getTile() == this)
{
Door* door = item->getDoor();
if(door && door->getDoorId() != 0)
house->addDoor(door);
if(!door)
{
BedItem* bed = item->getBed();
if(bed)
house->addBed(bed);
}
}
}
示例4: loadMap
//.........这里部分代码省略.........
setLastErrorString(ss.str());
return false;
break;
}
}
NODE nodeItem = f.getChildNode(nodeTile, type);
while(nodeItem){
if(type == OTBM_ITEM){
PropStream propStream;
f.getProps(nodeItem, propStream);
Item* item = Item::CreateItem(propStream);
if(!item){
std::stringstream ss;
ss << "[x:" << px << ", y:" << py << ", z:" << pz << "] " << "Failed to create item.";
setLastErrorString(ss.str());
return false;
}
if(item->unserializeItemNode(f, nodeItem, propStream)){
if(isHouseTile && !item->isNotMoveable()){
std::cout << "Warning: [OTBM loader] Moveable item in house id = " << house->getHouseId() << " Item type = " << item->getID() << std::endl;
delete item;
}
else{
tile->__internalAddThing(item);
item->__startDecaying();
// TESTING
if(isHouseTile){
Door* door = item->getDoor();
if(door && door->getDoorId() != 0){
house->addDoor(door);
}
}
//
}
}
else{
std::stringstream ss;
ss << "[x:" << px << ", y:" << py << ", z:" << pz << "] " << "Failed to load item " << item->getID() << ".";
setLastErrorString(ss.str());
delete item;
return false;
}
}
else{
std::stringstream ss;
ss << "[x:" << px << ", y:" << py << ", z:" << pz << "] " << "Unknown node type.";
setLastErrorString(ss.str());
}
nodeItem = f.getNextNode(nodeItem, type);
}
map->setTile(px, py, pz, tile);
}
else{
setLastErrorString("Unknown tile node.");
return false;
}
nodeTile = f.getNextNode(nodeTile, type);
}