void CLivingEntitySample::ProcessEvent( SEntityEvent& event ) { switch ( event.event ) { case ENTITY_EVENT_RESET: { const bool enteringGameMode = ( event.nParam[ 0 ] == 1 ); Reset( enteringGameMode ); } break; case ENTITY_EVENT_PREPHYSICSUPDATE: OnPrePhysicsUpdate(); break; } }
void CAnimatedCharacterSample::ProcessEvent(SEntityEvent &event) { switch(event.event) { case ENTITY_EVENT_RESET: { const bool enteringGameMode = (event.nParam[ 0 ] == 1); Reset(enteringGameMode); } break; case ENTITY_EVENT_PREPHYSICSUPDATE: OnPrePhysicsUpdate(); break; case ENTITY_EVENT_SCRIPT_EVENT: { const char *eventName = reinterpret_cast< const char * >(event.nParam[ 0 ]); OnScriptEvent(eventName); } break; } }