mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7785 from DaisukeHashimoto/fix_CCActionManagerEx_Bug
use fileName for _actionDic key
This commit is contained in:
commit
2a95286329
|
@ -115,7 +115,11 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V
|
|||
|
||||
ActionObject* ActionManagerEx::getActionByName(const char* jsonName,const char* actionName)
|
||||
{
|
||||
auto iterator = _actionDic.find(jsonName);
|
||||
std::string path = jsonName;
|
||||
ssize_t pos = path.find_last_of("/");
|
||||
std::string fileName = path.substr(pos+1,path.length());
|
||||
CCLOG("find filename == %s",fileName.c_str());
|
||||
auto iterator = _actionDic.find(fileName);
|
||||
if (iterator == _actionDic.end())
|
||||
{
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in New Issue