本文整理汇总了C++中CDesignType::FindEffectCreatorInType方法的典型用法代码示例。如果您正苦于以下问题:C++ CDesignType::FindEffectCreatorInType方法的具体用法?C++ CDesignType::FindEffectCreatorInType怎么用?C++ CDesignType::FindEffectCreatorInType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDesignType
的用法示例。
在下文中一共展示了CDesignType::FindEffectCreatorInType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: strParseInt
CEffectCreator *CEffectCreator::FindEffectCreator (const CString &sUNID)
// FindEffectCreator
//
// Finds the effect creator from a complex UNID (or NULL if not found)
{
// A complex UNID looks like this:
//
// For effects:
//
// {unid}
//
// "12345" = Effect UNID 12345
// "12345/0" = Effect UNID 12345; variant 0
// "12345/d:h" = Effect UNID 12345; damage; hit effect
//
// For overlays:
//
// {unid}:e
// {unid}:h
//
// For shields:
//
// {unid}:h
// "12345:h" = Shield UNID 12345; Hit effect
//
// For system maps:
//
// {unid}/{nodeID}
// {unid}/{nodeID}[/{nodeID}]
//
// For weapons:
//
// {unid}/{var}[/f{frag}]:(e | h | f)
//
// "12345/0:e" = Weapon UNID 12345; variant 0; Bullet effect
// "12345/0/f0:h" = Weapon UNID 12345; variant 0; fragment 0; Hit Effect
//
// First we parse the UNID
char *pPos = sUNID.GetASCIIZPointer();
DWORD dwUNID = strParseInt(pPos, 0, &pPos);
// Look for the design type
CDesignType *pDesign = g_pUniverse->FindDesignType(dwUNID);
if (pDesign == NULL)
return NULL;
// Allow the design type to parse the remainder of the UNID
return pDesign->FindEffectCreatorInType(CString(pPos));
}