mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_hot_fix
This commit is contained in:
commit
b782814b4b
|
@ -191,7 +191,7 @@ bool TriggerMng::isEmpty(void) const
|
|||
}
|
||||
|
||||
|
||||
void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
|
||||
void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
|
||||
{
|
||||
int count = pCocoNode[13].GetChildNum();
|
||||
int length = 0;
|
||||
|
@ -262,12 +262,12 @@ bool TriggerMng::isEmpty(void) const
|
|||
}
|
||||
else
|
||||
{
|
||||
rapidjson::Type type = pDataItemArray[i4].GetType(pCocoLoader);
|
||||
rapidjson::Type type = pDataItemArray[i5].GetType(pCocoLoader);
|
||||
if (type == rapidjson::kStringType)
|
||||
{
|
||||
dataitem.AddMember("value", str3, allocator);
|
||||
}
|
||||
else if(type == rapidjson::kNumberType)
|
||||
else
|
||||
{
|
||||
int nV = atoi(str3);
|
||||
float fV = atof(str3);
|
||||
|
@ -343,7 +343,7 @@ bool TriggerMng::isEmpty(void) const
|
|||
{
|
||||
dataitem.AddMember("value", str5, allocator);
|
||||
}
|
||||
else if(type == rapidjson::kNumberType)
|
||||
else
|
||||
{
|
||||
int nV = atoi(str5);
|
||||
float fV = atof(str5);
|
||||
|
|
|
@ -241,98 +241,98 @@ void TriggerObj::serialize(const rapidjson::Value &val)
|
|||
}
|
||||
|
||||
|
||||
void TriggerObj::serialize(cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
|
||||
void TriggerObj::serialize(cocostudio::CocoLoader *pCocoLoader, cocostudio::stExpCocoNode *pCocoNode)
|
||||
{
|
||||
int length = pCocoNode->GetChildNum();
|
||||
int count = 0;
|
||||
int num = 0;
|
||||
stExpCocoNode *pTriggerObjArray = pCocoNode->GetChildArray(pCocoLoader);
|
||||
for (int i0 = 0; i0 < length; ++i0)
|
||||
{
|
||||
int length = pCocoNode->GetChildNum();
|
||||
int count = 0;
|
||||
int num = 0;
|
||||
stExpCocoNode *pTriggerObjArray = pCocoNode->GetChildArray(pCocoLoader);
|
||||
for (int i0 = 0; i0 < length; ++i0)
|
||||
std::string key = pTriggerObjArray[i0].GetName(pCocoLoader);
|
||||
const char* str0 = pTriggerObjArray[i0].GetValue(pCocoLoader);
|
||||
if (key.compare("id") == 0)
|
||||
{
|
||||
std::string key = pTriggerObjArray[i0].GetName(pCocoLoader);
|
||||
const char* str0 = pTriggerObjArray[i0].GetValue(pCocoLoader);
|
||||
if (key.compare("id") == 0)
|
||||
if (str0 != nullptr)
|
||||
{
|
||||
if (str0 != nullptr)
|
||||
{
|
||||
_id = atoi(str0); //(unsigned int)(DICTOOL->getIntValue_json(val, "id"));
|
||||
}
|
||||
_id = atoi(str0);
|
||||
}
|
||||
else if (key.compare("conditions") == 0)
|
||||
}
|
||||
else if (key.compare("conditions") == 0)
|
||||
{
|
||||
count = pTriggerObjArray[i0].GetChildNum();
|
||||
stExpCocoNode *pConditionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
|
||||
for (int i1 = 0; i1 < count; ++i1)
|
||||
{
|
||||
count = pTriggerObjArray[i0].GetChildNum();
|
||||
stExpCocoNode *pConditionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
|
||||
for (int i1 = 0; i1 < count; ++i1)
|
||||
num = pConditionsArray[i1].GetChildNum();
|
||||
stExpCocoNode *pConditionArray = pConditionsArray[i1].GetChildArray(pCocoLoader);
|
||||
const char *classname = pConditionArray[0].GetValue(pCocoLoader);
|
||||
if (classname == nullptr)
|
||||
{
|
||||
num = pConditionsArray[i1].GetChildNum();
|
||||
stExpCocoNode *pConditionArray = pConditionsArray[i1].GetChildArray(pCocoLoader);
|
||||
const char *classname = pConditionArray[0].GetValue(pCocoLoader);
|
||||
if (classname == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
BaseTriggerCondition *con = dynamic_cast<BaseTriggerCondition*>(ObjectFactory::getInstance()->createObject(classname));
|
||||
CCAssert(con != nullptr, "class named classname can not implement!");
|
||||
con->serialize(pCocoLoader, &pConditionArray[1]);
|
||||
con->init();
|
||||
_cons.pushBack(con);
|
||||
continue;
|
||||
}
|
||||
BaseTriggerCondition *con = dynamic_cast<BaseTriggerCondition*>(ObjectFactory::getInstance()->createObject(classname));
|
||||
CCAssert(con != nullptr, "class named classname can not implement!");
|
||||
con->serialize(pCocoLoader, &pConditionArray[1]);
|
||||
con->init();
|
||||
_cons.pushBack(con);
|
||||
}
|
||||
else if (key.compare("actions") == 0)
|
||||
}
|
||||
else if (key.compare("actions") == 0)
|
||||
{
|
||||
count = pTriggerObjArray[i0].GetChildNum();
|
||||
stExpCocoNode *pActionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
|
||||
for (int i2 = 0; i2 < count; ++i2)
|
||||
{
|
||||
count = pTriggerObjArray[i0].GetChildNum();
|
||||
stExpCocoNode *pActionsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
|
||||
for (int i2 = 0; i2 < count; ++i2)
|
||||
num = pActionsArray[i2].GetChildNum();
|
||||
stExpCocoNode *pActionArray = pActionsArray[i2].GetChildArray(pCocoLoader);
|
||||
const char *classname = pActionArray[0].GetValue(pCocoLoader);
|
||||
if (classname == nullptr)
|
||||
{
|
||||
num = pActionsArray[i2].GetChildNum();
|
||||
stExpCocoNode *pActionArray = pActionsArray[i2].GetChildArray(pCocoLoader);
|
||||
const char *classname = pActionArray[0].GetValue(pCocoLoader);
|
||||
if (classname == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
BaseTriggerAction *act = dynamic_cast<BaseTriggerAction*>(ObjectFactory::getInstance()->createObject(classname));
|
||||
CCAssert(act != nullptr, "class named classname can not implement!");
|
||||
act->serialize(pCocoLoader, &pActionArray[1]);
|
||||
act->init();
|
||||
_acts.pushBack(act);
|
||||
continue;
|
||||
}
|
||||
BaseTriggerAction *act = dynamic_cast<BaseTriggerAction*>(ObjectFactory::getInstance()->createObject(classname));
|
||||
CCAssert(act != nullptr, "class named classname can not implement!");
|
||||
act->serialize(pCocoLoader, &pActionArray[1]);
|
||||
act->init();
|
||||
_acts.pushBack(act);
|
||||
}
|
||||
else if (key.compare("events") == 0)
|
||||
}
|
||||
else if (key.compare("events") == 0)
|
||||
{
|
||||
count = pTriggerObjArray[i0].GetChildNum();
|
||||
stExpCocoNode *pEventsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
|
||||
for (int i3 = 0; i3 < count; ++i3)
|
||||
{
|
||||
count = pTriggerObjArray[i0].GetChildNum();
|
||||
stExpCocoNode *pEventsArray = pTriggerObjArray[i0].GetChildArray(pCocoLoader);
|
||||
for (int i3 = 0; i3 < count; ++i3)
|
||||
num = pEventsArray[i3].GetChildNum();
|
||||
stExpCocoNode *pEventArray = pEventsArray[i3].GetChildArray(pCocoLoader);
|
||||
const char *str1 = pEventArray[0].GetValue(pCocoLoader);
|
||||
if (str1 == nullptr)
|
||||
{
|
||||
num = pEventsArray[i3].GetChildNum();
|
||||
stExpCocoNode *pEventArray = pEventsArray[i3].GetChildArray(pCocoLoader);
|
||||
const char *str1 = pEventArray[0].GetValue(pCocoLoader);
|
||||
if (str1 == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int event = atoi(str1);
|
||||
if (event < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
char* buf = new char[10];
|
||||
sprintf(buf, "%d", event);
|
||||
std::string custom_event_name(buf);
|
||||
CC_SAFE_DELETE_ARRAY(buf);
|
||||
|
||||
EventListenerCustom* listener = EventListenerCustom::create(custom_event_name, [=](EventCustom* evt){
|
||||
if (detect())
|
||||
{
|
||||
done();
|
||||
}
|
||||
});
|
||||
_listeners.pushBack(listener);
|
||||
TriggerMng::getInstance()->addEventListenerWithFixedPriority(listener, 1);
|
||||
continue;
|
||||
}
|
||||
int event = atoi(str1);
|
||||
if (event < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
char* buf = new char[10];
|
||||
sprintf(buf, "%d", event);
|
||||
std::string custom_event_name(buf);
|
||||
CC_SAFE_DELETE_ARRAY(buf);
|
||||
|
||||
EventListenerCustom* listener = EventListenerCustom::create(custom_event_name, [=](EventCustom* evt){
|
||||
if (detect())
|
||||
{
|
||||
done();
|
||||
}
|
||||
});
|
||||
_listeners.pushBack(listener);
|
||||
TriggerMng::getInstance()->addEventListenerWithFixedPriority(listener, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ OnSimpleStickListener, OnAccListener, OnGyroListener, OnStateListener, GameContr
|
|||
{
|
||||
if( !mControllerService.hasDeviceConnected() ){
|
||||
Bundle bun = new Bundle();
|
||||
bun.putBoolean(ControllerService.FLAG_IS_SHOW_GAMEPAD_TIP, true);
|
||||
bun.putBoolean(ControllerService.FLAG_IS_SHOW_GAMEPAD_TIP, false);
|
||||
try {
|
||||
mControllerService.showDeviceManagerUI(mContext, bun);
|
||||
} catch (ControllerServiceException e) {
|
||||
|
|
|
@ -23,14 +23,6 @@
|
|||
-- @param #char char
|
||||
-- @return ActionObject#ActionObject ret (return value: ccs.ActionObject)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionManagerEx] initWithBinary
|
||||
-- @param self
|
||||
-- @param #char char
|
||||
-- @param #cc.Ref ref
|
||||
-- @param #ccs.CocoLoader cocoloader
|
||||
-- @param #ccs.stExpCocoNode stexpcoconode
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionManagerEx] releaseActions
|
||||
-- @param self
|
||||
|
|
|
@ -61,13 +61,6 @@
|
|||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionObject] initWithBinary
|
||||
-- @param self
|
||||
-- @param #ccs.CocoLoader cocoloader
|
||||
-- @param #ccs.stExpCocoNode stexpcoconode
|
||||
-- @param #cc.Ref ref
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionObject] addActionNode
|
||||
-- @param self
|
||||
|
|
|
@ -134,11 +134,6 @@
|
|||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getonEnterTransitionDidFinishCallback
|
||||
-- @param self
|
||||
-- @return function#function ret (return value: function)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getGLProgram
|
||||
-- @param self
|
||||
|
@ -257,11 +252,6 @@
|
|||
-- @param #cc.Touch touch
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getOnEnterCallback
|
||||
-- @param self
|
||||
-- @return function#function ret (return value: function)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] convertToNodeSpace
|
||||
-- @param self
|
||||
|
@ -570,11 +560,6 @@
|
|||
-- @param #float float
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getOnExitCallback
|
||||
-- @param self
|
||||
-- @return function#function ret (return value: function)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getChildByTag
|
||||
-- @param self
|
||||
|
@ -672,11 +657,6 @@
|
|||
-- @param self
|
||||
-- @param #cc.Ref ref
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getonExitTransitionDidStartCallback
|
||||
-- @param self
|
||||
-- @return function#function ret (return value: function)
|
||||
|
||||
--------------------------------
|
||||
-- overload function: removeFromParentAndCleanup(bool)
|
||||
--
|
||||
|
|
|
@ -19,12 +19,4 @@
|
|||
-- @function [parent=#SkeletonAnimation] clearTrack
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#SkeletonAnimation] onAnimationStateEvent
|
||||
-- @param self
|
||||
-- @param #int int
|
||||
-- @param #spEventType speventtype
|
||||
-- @param #spEvent spevent
|
||||
-- @param #int int
|
||||
|
||||
return nil
|
||||
|
|
|
@ -4721,50 +4721,6 @@ int lua_cocos2dx_Node_getTag(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getonEnterTransitionDidFinishCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Node* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getonEnterTransitionDidFinishCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
const std::function<void ()>& ret = cobj->getonEnterTransitionDidFinishCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getonEnterTransitionDidFinishCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getonEnterTransitionDidFinishCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getGLProgram(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -5782,50 +5738,6 @@ int lua_cocos2dx_Node_convertTouchToNodeSpaceAR(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getOnEnterCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Node* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOnEnterCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
const std::function<void ()>& ret = cobj->getOnEnterCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getOnEnterCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOnEnterCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_convertToNodeSpace(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -8379,50 +8291,6 @@ int lua_cocos2dx_Node_setScale(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getOnExitCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Node* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOnExitCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
const std::function<void ()>& ret = cobj->getOnExitCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getOnExitCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOnExitCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getChildByTag(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -9245,50 +9113,6 @@ int lua_cocos2dx_Node_setUserObject(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getonExitTransitionDidStartCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Node* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getonExitTransitionDidStartCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
const std::function<void ()>& ret = cobj->getonExitTransitionDidStartCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getonExitTransitionDidStartCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getonExitTransitionDidStartCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_removeFromParentAndCleanup(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -9942,7 +9766,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents);
|
||||
tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder);
|
||||
tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag);
|
||||
tolua_function(tolua_S,"getonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_getonEnterTransitionDidFinishCallback);
|
||||
tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram);
|
||||
tolua_function(tolua_S,"getNodeToWorldTransform",lua_cocos2dx_Node_getNodeToWorldTransform);
|
||||
tolua_function(tolua_S,"getPosition3D",lua_cocos2dx_Node_getPosition3D);
|
||||
|
@ -9965,7 +9788,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getRotation3D",lua_cocos2dx_Node_getRotation3D);
|
||||
tolua_function(tolua_S,"getNodeToParentTransform",lua_cocos2dx_Node_getNodeToParentTransform);
|
||||
tolua_function(tolua_S,"convertTouchToNodeSpaceAR",lua_cocos2dx_Node_convertTouchToNodeSpaceAR);
|
||||
tolua_function(tolua_S,"getOnEnterCallback",lua_cocos2dx_Node_getOnEnterCallback);
|
||||
tolua_function(tolua_S,"convertToNodeSpace",lua_cocos2dx_Node_convertToNodeSpace);
|
||||
tolua_function(tolua_S,"resume",lua_cocos2dx_Node_resume);
|
||||
tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody);
|
||||
|
@ -10021,7 +9843,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getParentToNodeTransform",lua_cocos2dx_Node_getParentToNodeTransform);
|
||||
tolua_function(tolua_S,"setGlobalZOrder",lua_cocos2dx_Node_setGlobalZOrder);
|
||||
tolua_function(tolua_S,"setScale",lua_cocos2dx_Node_setScale);
|
||||
tolua_function(tolua_S,"getOnExitCallback",lua_cocos2dx_Node_getOnExitCallback);
|
||||
tolua_function(tolua_S,"getChildByTag",lua_cocos2dx_Node_getChildByTag);
|
||||
tolua_function(tolua_S,"setOrderOfArrival",lua_cocos2dx_Node_setOrderOfArrival);
|
||||
tolua_function(tolua_S,"getScaleZ",lua_cocos2dx_Node_getScaleZ);
|
||||
|
@ -10040,7 +9861,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getGlobalZOrder",lua_cocos2dx_Node_getGlobalZOrder);
|
||||
tolua_function(tolua_S,"draw",lua_cocos2dx_Node_draw);
|
||||
tolua_function(tolua_S,"setUserObject",lua_cocos2dx_Node_setUserObject);
|
||||
tolua_function(tolua_S,"getonExitTransitionDidStartCallback",lua_cocos2dx_Node_getonExitTransitionDidStartCallback);
|
||||
tolua_function(tolua_S,"removeFromParent",lua_cocos2dx_Node_removeFromParentAndCleanup);
|
||||
tolua_function(tolua_S,"setPosition3D",lua_cocos2dx_Node_setPosition3D);
|
||||
tolua_function(tolua_S,"update",lua_cocos2dx_Node_update);
|
||||
|
|
|
@ -1605,10 +1605,6 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -494,61 +494,6 @@ int lua_cocos2dx_spine_SkeletonAnimation_clearTrack(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
spine::SkeletonAnimation* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 4)
|
||||
{
|
||||
int arg0;
|
||||
spEventType arg1;
|
||||
spEvent* arg2;
|
||||
int arg3;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1);
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR spEvent*;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->onAnimationStateEvent(arg0, arg1, arg2, arg3);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "onAnimationStateEvent",argc, 4);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_spine_SkeletonAnimation_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (SkeletonAnimation)");
|
||||
|
@ -564,7 +509,6 @@ int lua_register_cocos2dx_spine_SkeletonAnimation(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"setMix",lua_cocos2dx_spine_SkeletonAnimation_setMix);
|
||||
tolua_function(tolua_S,"clearTracks",lua_cocos2dx_spine_SkeletonAnimation_clearTracks);
|
||||
tolua_function(tolua_S,"clearTrack",lua_cocos2dx_spine_SkeletonAnimation_clearTrack);
|
||||
tolua_function(tolua_S,"onAnimationStateEvent",lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(spine::SkeletonAnimation).name();
|
||||
g_luaType[typeName] = "sp.SkeletonAnimation";
|
||||
|
|
|
@ -24,5 +24,4 @@ int register_all_cocos2dx_spine(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_spine_h__
|
||||
|
|
|
@ -2103,58 +2103,6 @@ int lua_cocos2dx_studio_ActionObject_getLoop(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_studio_ActionObject_initWithBinary(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocostudio::ActionObject* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccs.ActionObject",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocostudio::ActionObject*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_studio_ActionObject_initWithBinary'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 3)
|
||||
{
|
||||
cocostudio::CocoLoader* arg0;
|
||||
cocostudio::stExpCocoNode* arg1;
|
||||
cocos2d::Ref* arg2;
|
||||
|
||||
ok &= luaval_to_object<cocostudio::CocoLoader>(tolua_S, 2, "ccs.CocoLoader",&arg0);
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR stExpCocoNode*;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Ref>(tolua_S, 4, "cc.Ref",&arg2);
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->initWithBinary(arg0, arg1, arg2);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "initWithBinary",argc, 3);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_studio_ActionObject_initWithBinary'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_studio_ActionObject_addActionNode(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -2485,7 +2433,6 @@ int lua_register_cocos2dx_studio_ActionObject(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getCurrentTime",lua_cocos2dx_studio_ActionObject_getCurrentTime);
|
||||
tolua_function(tolua_S,"removeActionNode",lua_cocos2dx_studio_ActionObject_removeActionNode);
|
||||
tolua_function(tolua_S,"getLoop",lua_cocos2dx_studio_ActionObject_getLoop);
|
||||
tolua_function(tolua_S,"initWithBinary",lua_cocos2dx_studio_ActionObject_initWithBinary);
|
||||
tolua_function(tolua_S,"addActionNode",lua_cocos2dx_studio_ActionObject_addActionNode);
|
||||
tolua_function(tolua_S,"getUnitTime",lua_cocos2dx_studio_ActionObject_getUnitTime);
|
||||
tolua_function(tolua_S,"isPlaying",lua_cocos2dx_studio_ActionObject_isPlaying);
|
||||
|
@ -2616,61 +2563,6 @@ int lua_cocos2dx_studio_ActionManagerEx_getActionByName(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_studio_ActionManagerEx_initWithBinary(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocostudio::ActionManagerEx* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccs.ActionManagerEx",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocostudio::ActionManagerEx*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_studio_ActionManagerEx_initWithBinary'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 4)
|
||||
{
|
||||
const char* arg0;
|
||||
cocos2d::Ref* arg1;
|
||||
cocostudio::CocoLoader* arg2;
|
||||
cocostudio::stExpCocoNode* arg3;
|
||||
|
||||
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp); arg0 = arg0_tmp.c_str();
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Ref>(tolua_S, 3, "cc.Ref",&arg1);
|
||||
|
||||
ok &= luaval_to_object<cocostudio::CocoLoader>(tolua_S, 4, "ccs.CocoLoader",&arg2);
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR stExpCocoNode*;
|
||||
if(!ok)
|
||||
return 0;
|
||||
cobj->initWithBinary(arg0, arg1, arg2, arg3);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "initWithBinary",argc, 4);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_studio_ActionManagerEx_initWithBinary'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_studio_ActionManagerEx_releaseActions(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -2789,7 +2681,6 @@ int lua_register_cocos2dx_studio_ActionManagerEx(lua_State* tolua_S)
|
|||
tolua_beginmodule(tolua_S,"ActionManagerEx");
|
||||
tolua_function(tolua_S,"playActionByName",lua_cocos2dx_studio_ActionManagerEx_playActionByName);
|
||||
tolua_function(tolua_S,"getActionByName",lua_cocos2dx_studio_ActionManagerEx_getActionByName);
|
||||
tolua_function(tolua_S,"initWithBinary",lua_cocos2dx_studio_ActionManagerEx_initWithBinary);
|
||||
tolua_function(tolua_S,"releaseActions",lua_cocos2dx_studio_ActionManagerEx_releaseActions);
|
||||
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_studio_ActionManagerEx_destroyInstance);
|
||||
tolua_function(tolua_S,"getInstance", lua_cocos2dx_studio_ActionManagerEx_getInstance);
|
||||
|
|
|
@ -489,8 +489,6 @@ int register_all_cocos2dx_studio(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
6
setup.py
6
setup.py
|
@ -98,7 +98,11 @@ class SetEnvVar(object):
|
|||
return sys.platform == 'darwin'
|
||||
|
||||
def _is_zsh(self):
|
||||
return os.environ.get('SHELL')[-3:] == "zsh"
|
||||
shellItem = os.environ.get('SHELL')
|
||||
if shellItem is not None:
|
||||
if len(shellItem) >= 3:
|
||||
return shellItem[-3:] == "zsh"
|
||||
return False
|
||||
|
||||
def _get_unix_file_list(self):
|
||||
file_list = None
|
||||
|
|
|
@ -174,6 +174,7 @@ function SceneEditorTestLayer:createMenu()
|
|||
|
||||
if sceneEditorTestIdx == #SceneEditorTestLayer.title then
|
||||
self:unscheduleUpdate()
|
||||
ccs.TriggerMng.getInstance():removeAll()
|
||||
end
|
||||
|
||||
SceneEditorTestLayer.fileName = self:loadFileChangeHelper(SceneEditorTestLayer.fileName)
|
||||
|
@ -846,13 +847,11 @@ function TriggerTest:onEnter()
|
|||
ccs.sendTriggerEvent(triggerEventDef.TRIGGEREVENT_UPDATESCENE)
|
||||
end
|
||||
self:scheduleUpdateWithPriorityLua(update,0)
|
||||
|
||||
ccs.sendTriggerEvent(triggerEventDef.TRIGGEREVENT_ENTERSCENE)
|
||||
end
|
||||
end
|
||||
|
||||
function TriggerTest:defaultPlay()
|
||||
|
||||
ccs.sendTriggerEvent(triggerEventDef.TRIGGEREVENT_ENTERSCENE)
|
||||
end
|
||||
|
||||
function TriggerTest:onExit()
|
||||
|
|
Loading…
Reference in New Issue