本文整理汇总了C++中VString类的典型用法代码示例。如果您正苦于以下问题:C++ VString类的具体用法?C++ VString怎么用?C++ VString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了VString类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: MapName
MapName(VString<15> v) : _impl(v.oislice_h(std::find(v.begin(), v.end(), '.'))) {}
开发者ID:cinderweb,项目名称:tmwa,代码行数:1,代码来源:mmo.hpp
示例2: to__lower
VString<23> to__lower() const
{
return _impl.to_lower();
}
开发者ID:cinderweb,项目名称:tmwa,代码行数:4,代码来源:mmo.hpp
示例3: to__upper
VString<23> to__upper() const
{
return _impl.to_upper();
}
开发者ID:cinderweb,项目名称:tmwa,代码行数:4,代码来源:mmo.hpp
示例4: VVERIFY_OR_RET
void RPG_Action_RangedAttack::Tick(float const deltaTime)
{
RPG_Action_AttackBase::Tick(deltaTime);
if(m_attacking)
{
// RangedAttacking was set to true when the action was initiated. Is reset to false by Behavior when the attack anim finishes.
vHavokBehaviorComponent *const behaviorComponent = m_characterOwner->GetBehaviorComponent();
VVERIFY_OR_RET(behaviorComponent);
VASSERT(!m_behaviorTriggerVarName.IsEmpty());
if (!RPG_VisionHavokBehaviorHelper::BehaviorGetVarNamed<bool>(*behaviorComponent, m_behaviorTriggerVarName.AsChar()))
{
if (m_flags == 1)
{
if(m_updatedInteraction)
{
m_updatedInteraction = false;
if(!m_updatedInteractionEntity && m_interactionEntity)
{
// Do not lose the player's intended target
ValidateInteractionEntity();
if(!m_interactionEntity->Components().GetComponentOfType(V_RUNTIME_CLASS(RPG_AttackableComponent)))
{
m_interactionEntity = NULL;
}
else
{
if(m_interactionEntity->GetPosition().getDistanceToSquared(m_updatedInteractionPosition) > s_retargetingRadius * s_retargetingRadius)
{
m_interactionEntity = NULL;
}
}
}
else
{
m_interactionEntity = m_updatedInteractionEntity;
ValidateInteractionEntity();
}
m_interactionPosition = m_updatedInteractionPosition;
}
m_startTime = Vision::GetTimer()->GetTime();
StartAttack();
}
else
{
// if we've gotten to the end and haven't fired the projectile, fire it now
if (!m_hasFired)
{
VString msg;
msg.Format("RPG_Action_RangedAttack never received expected %s event from Behavior.", m_behaviorFireEventName.AsChar());
Vision::Error.Warning(msg.AsChar());
//VASSERT_MSG(false, msg.AsChar());
FireAttack();
}
End();
}
}
else
{
// we're currently attacking
hkvVec3 const targetPosition = m_interactionEntity ? m_interactionEntity->GetPosition() : m_interactionPosition;
FaceTargetPoint(targetPosition);
#ifdef _DEBUG
if (m_debugDisplayInfo)
{
Vision::Game.DrawSingleLine(m_characterOwner->GetPosition(), targetPosition, VColorRef(255, 0, 255));
}
#endif
}
}
else
{
StartAttack();
}
}
开发者ID:Bewolf2,项目名称:projectanarchy,代码行数:77,代码来源:ActionRangedAttack.cpp
注:本文中的VString类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论