示例#1
0
void CSFXMgr::OnTouchNotify(HOBJECT hMain, CollisionInfo *pInfo, float forceMag)
{
	if (!hMain) return;

	// See if this is the move-mgr's object...

	if (hMain == g_pPlayerMgr->GetMoveMgr()->GetObject())
	{
		g_pPlayerMgr->GetMoveMgr()->OnTouchNotify(pInfo, forceMag);
	}
	else
	{
		// Okay see if this is a special fx...

		CSpecialFX* pFX = FindSpecialFX(SFX_PROJECTILE_ID, hMain);

		if (pFX)
		{
			pFX->HandleTouch(pInfo);
		}
	}
}