标签:cal npc typedef mask void 效果 isp style ast
bool IsNpc(APawn* pPawn) const {return (NULL != Cast<ASA2NpcPawn>(pPawn));} bool IsMonster(APawn* pPawn) const ... bool IsPet... typedef bool (*CheckPawnType)(APawn* pPawn) const; void MaskPawn(ASA2Pawn* aPawn, CheckPawnType CheckCall) { if(aPawn && (*CheckCall)(aPawn)) { aPawn->bMask = true; } }
调用方式:
MaskPawn(aPawn, &IsNpc);
MaskPawn(aPawn, &IsPet);
标签:cal npc typedef mask void 效果 isp style ast
原文地址:https://www.cnblogs.com/YoungBig/p/9343770.html