本文整理汇总了C++中PropertyBag::getBool方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyBag::getBool方法的具体用法?C++ PropertyBag::getBool怎么用?C++ PropertyBag::getBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyBag
的用法示例。
在下文中一共展示了PropertyBag::getBool方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void ComponentExitMapOnUse::load(const PropertyBag &data)
{
resetMembers();
nextMap = data.getFileName("nextMap");
sfxOnFail = data.getFileName("sfxOnFailed");
requiresCoins = data.getBool("requiresCoins");
}
示例2: load
void ComponentHealth::load(const PropertyBag &data)
{
resetMembers();
health = data.getInt("health");
maxHealth = data.getInt("maxHealth");
damageToPowerRatio = data.getFloat("damageToPowerRatio");
willResurrectAfterCountDown = data.getBool("willResurrectAfterCountDown");
timeUntilResurrection = data.getFloat("timeUntilResurrection");
data.get("displayPower", displayPower); // optional tag
}
示例3: loadParticleMaterials
void ParticleSystem::loadParticleMaterials(const PropertyBag &data,
TextureFactory &textureFactory)
{
const size_t nMaterials = data.getNumInstances("material");
ASSERT(nMaterials>0, "particle system does not specify any materials");
for(size_t i=0; i<nMaterials; ++i)
{
PropertyBag MatBag = data.getBag("material", i);
Material material;
const string name = MatBag.getString("name");
const FileName fileName = MatBag.getString("image");
material.setTexture(textureFactory.load(fileName, false));
material.glow = MatBag.getBool("glow");
materials.insert(make_pair(name, material));
}
ASSERT(!materials.empty(),
"after loading, there are no particle materials in system");
}