It looks like you're new here. If you want to get involved, click one of these buttons!
/** Event handler
*/
orxSTATUS orxFASTCALL EventHandler(const orxEVENT *_pstEvent)
{
orxFX_EVENT_PAYLOAD *fx_info;
orxINPUT_EVENT_PAYLOAD *input_info;
/* Is a new contact? */
if(_pstEvent->eID == orxPHYSICS_EVENT_CONTACT_ADD)
{
orxOBJECT *pstObject1, *pstObject2;
/* Gets colliding objects */
pstObject1 = orxOBJECT(_pstEvent->hRecipient);
pstObject2 = orxOBJECT(_pstEvent->hSender);
/* On hit, delete the player and all bullet objects. */
}
if(_pstEvent->eID == orxFX_EVENT_STOP)
{
fx_info = (orxFX_EVENT_PAYLOAD *)_pstEvent->pstPayload;
orxLOG("FX %s stopped.", fx_info->zFXName);
if(!orxString_Compare(fx_info->zFXName, "FadeFX4"))
LoadMenu(0);
}
if(_pstEvent->eID == orxINPUT_EVENT_ON)
{
input_info = (orxINPUT_EVENT_PAYLOAD *)_pstEvent->pstPayload;
orxLOG("Input %s is on.", input_info->zInputName);
}
if(_pstEvent->eID == orxINPUT_EVENT_OFF)
{
input_info = (orxINPUT_EVENT_PAYLOAD *)_pstEvent->pstPayload;
orxLOG("Input %s is off.", input_info->zInputName);
}
return orxSTATUS_SUCCESS;
}
Comments
IDs are unique within one type but not globally.