本文整理汇总了C++中ContentFeatures::setNodeBox方法的典型用法代码示例。如果您正苦于以下问题:C++ ContentFeatures::setNodeBox方法的具体用法?C++ ContentFeatures::setNodeBox怎么用?C++ ContentFeatures::setNodeBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentFeatures
的用法示例。
在下文中一共展示了ContentFeatures::setNodeBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: content_mapnode_plants
//.........这里部分代码省略.........
f->setAllTextureFlags(0);
f->light_propagates = true;
f->param_type = CPT_LIGHT;
f->draw_type = CDT_PLANTLIKE;
f->air_equivalent = true;
f->dug_item = std::string("CraftItem cactus_fruit 1");
f->solidness = 0; // drawn separately, makes no faces
f->walkable = false;
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30/32;
f->type = CMT_PLANT;
f->hardness = 0.20;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
lists::add("creative",i);
i = CONTENT_CACTUS;
f = &content_features(i);
f->description = wgettext("Cactus");
f->setAllTextures("cactus_side.png");
f->setTexture(0, "cactus_top.png");
f->setTexture(1, "cactus_top.png");
f->draw_type = CDT_NODEBOX;
f->param_type = CPT_LIGHT;
f->light_propagates = true;
f->sunlight_propagates = true;
f->damage_per_second = 2;
f->solidness = 0; // drawn separately, makes no faces
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30/4;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->extra_dug_item = std::string("CraftItem2 ") + itos (CONTENT_CRAFTITEM_MUSH) + " 1";
f->extra_dug_item_rarity = 10;
f->setNodeBox(core::aabbox3d<f32>(
-0.4375*BS,
-0.5*BS,
-0.4375*BS,
0.4375*BS,
0.5*BS,
0.4375*BS
));
f->addNodeBox(core::aabbox3d<f32>(
-0.5*BS,
0.3125*BS,
-0.5*BS,
-0.4375*BS,
0.375*BS,
-0.4375*BS
));
f->addNodeBox(core::aabbox3d<f32>(
0.4375*BS,
0.125*BS,
0.4375*BS,
0.5*BS,
0.1875*BS,
0.5*BS
));
f->addNodeBox(core::aabbox3d<f32>(
0.4375*BS,
-0.1875*BS,
-0.5*BS,
0.5*BS,
-0.125*BS,
-0.4375*BS
));
f->addNodeBox(core::aabbox3d<f32>(