mirror of https://github.com/axmolengine/axmol.git
Unregister spine event lua event handler should set listener to null. (#12845)
This commit is contained in:
parent
bcfdb57a66
commit
a8b6e33d9c
|
@ -320,21 +320,25 @@ int tolua_Cocos2d_CCSkeletonAnimation_unregisterSpineEventHandler00(lua_State* t
|
|||
switch (eventType) {
|
||||
case spEventType::SP_ANIMATION_START:
|
||||
handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_START;
|
||||
self->setStartListener(nullptr);
|
||||
break;
|
||||
case spEventType::SP_ANIMATION_INTERRUPT:
|
||||
handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_INTERRUPT;
|
||||
break;
|
||||
case spEventType::SP_ANIMATION_END:
|
||||
handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_END;
|
||||
self->setEndListener(nullptr);
|
||||
break;
|
||||
case spEventType::SP_ANIMATION_DISPOSE:
|
||||
handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_DISPOSE;
|
||||
break;
|
||||
case spEventType::SP_ANIMATION_COMPLETE:
|
||||
handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_COMPLETE;
|
||||
self->setCompleteListener(nullptr);
|
||||
break;
|
||||
case spEventType::SP_ANIMATION_EVENT:
|
||||
handlerType = ScriptHandlerMgr::HandlerType::EVENT_SPINE_ANIMATION_EVENT;
|
||||
self->setEventListener(nullptr);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue