本文整理汇总了C++中PropertyBag::getFloat方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyBag::getFloat方法的具体用法?C++ PropertyBag::getFloat怎么用?C++ PropertyBag::getFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyBag
的用法示例。
在下文中一共展示了PropertyBag::getFloat方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void ComponentPhysicsGeom::load(const PropertyBag &data)
{
resetMembers();
desiredHeight = data.getFloat("height");
collisionRadius = data.getFloat("radius");
// Create as physics geometry
if(geom){dGeomDestroy(geom);} geom=0;
createGeom(data.getString("physicsGeometryType"));
// Set initial position
{
vec3 position;
if(data.get("position", position)) // optional tag
{
setPosition(position);
}
}
// Declare the initial state
getParentBlackBoard().relayMessage(MessagePositionHasBeenSet(getPosition()));
getParentBlackBoard().relayMessage(MessageOrientationHasBeenSet(getOrientation()));
getParentBlackBoard().relayMessage(MessageRequestSetHeight(desiredHeight));
}
示例2: load
void ComponentSpinAround::load(const PropertyBag &data)
{
resetMembers();
rotationSpeed = data.getFloat("rotationSpeed");
bounceHeight = data.getFloat("bounceHeight");
bounceSpeed = data.getFloat("bounceSpeed");
}
示例3: 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
}
示例4: load
void ComponentGate::load(const PropertyBag &data)
{
resetMembers();
state = ("a" == toLowerCase(data.getString("initialState")))
? STATE_A
: STATE_B;
positionA = data.getVec3("positionA");
positionB = data.getVec3("positionB");
timeToTransitionAB = data.getFloat("timeToTransitionAB");
timeToTransitionBA = data.getFloat("timeToTransitionBA");
}
示例5: setup
void Font::setup(const PropertyBag &data)
{
fontSize.clear();
fontSize[Font::SizeHuge] = data.getFloat("huge");
fontSize[Font::SizeLarge] = data.getFloat("large");
fontSize[Font::SizeNormal] = data.getFloat("normal");
fontSize[Font::SizeSmall] = data.getFloat("small");
spacing = data.getFloat("spacing");
lineHeight = data.getFloat("lineHeight");
loadFontImage(data.getFileName("image"));
}
示例6: load
void ComponentUserControllable::load( const PropertyBag &data )
{
mouseSensitivity = data.getFloat("mouseSensitivity");
}