Ejemplo n.º 1
0
int LuaEngine::sendEvent(ScriptEvent* evt)
{
    if (NULL == evt)
        return 0;
    
    switch (evt->type)
    {
//        case kNodeEvent:
//            {
//               return handleNodeEvent(evt->data);
//            }
//            break;
        case kCallFuncEvent:
            {
                return handleCallFuncActionEvent(evt->data);
            }
            break;
        case kScheduleEvent:
            {
                return handleScheduler(evt->data);
            }
            break;
//        case kTouchEvent:
//            {
//                return handleTouchEvent(evt->data);
//            }
//            break;
//        case kTouchesEvent:
//            {
//                return handleTouchesEvent(evt->data);
//            }
//            break;
//        case kKeypadEvent:
//            {
//                return handleKeypadEvent(evt->data);
//            }
//            break;
//        case kAccelerometerEvent:
//            {
//                return handleAccelerometerEvent(evt->data);
//            }
//            break;
        case kCommonEvent:
            {
                return handleCommonEvent(evt->data);
            }
            break;
        case kControlEvent:
            {
                return handlerControlEvent(evt->data);
            }
            break;
        default:
            break;
    }
    
    return 0;
}
Ejemplo n.º 2
0
int LuaEngine::sendEvent(ScriptEvent* evt)
{
    if (NULL == evt)
        return 0;
    
    switch (evt->type)
    {
        case kNodeEvent:
            {
               return handleNodeEvent(evt->data);
            }
            break;
        case kMenuClickedEvent:
            {
                return handleMenuClickedEvent(evt->data);
            }
            break;
        case kNotificationEvent:
            {
                return handleNotificationEvent(evt->data);
            }
            break;
        case kCallFuncEvent:
            {
                return handleCallFuncActionEvent(evt->data);
            }
            break;
        case kScheduleEvent:
            {
                return handleScheduler(evt->data);
            }
            break;
        case kTouchEvent:
            {
                return handleTouchEvent(evt->data);
            }
            break;
        case kTouchesEvent:
            {
                return handleTouchesEvent(evt->data);
            }
            break;
        case kKeypadEvent:
            {
                return handleKeypadEvent(evt->data);
            }
            break;
        case kAccelerometerEvent:
            {
                return handleAccelerometerEvent(evt->data);
            }
            break;
        case kCommonEvent:
            {
                return handleCommonEvent(evt->data);
            }
            break;
        case kControlEvent:
            {
                return handlerControlEvent(evt->data);
            }
            break;
        case kTableViewEvent:
            {
                return handleTableViewEvent(evt->data);
            }
            break;
        case kAssetsManagerEvent:
            {
                return handleAssetsManagerEvent(evt->data);
            }
            break;
        case kCocoStudioEventListener:
            {
                return handleCocoStudioEventListener(evt->data);
            }
            break;
        case kArmatureWrapper:
            {
                return handleArmatureWrapper(evt->data);
            }
            break;
        default:
            break;
    }
    
    return 0;
}