mirror of https://github.com/axmolengine/axmol.git
fixed #3480 add search paths.
This commit is contained in:
parent
77dca5958f
commit
e08e4ce0f8
|
@ -362,6 +362,10 @@ namespace cocostudio {
|
|||
pAudio->setFile(pPath.c_str());
|
||||
const bool bLoop = (DICTOOL->getIntValue_json(subDict, "loop") != 0);
|
||||
pAudio->setLoop(bLoop);
|
||||
if (pComName != NULL)
|
||||
{
|
||||
pAudio->setName(pComName);
|
||||
}
|
||||
gb->addComponent(pAudio);
|
||||
if (pComName != NULL)
|
||||
{
|
||||
|
|
|
@ -45,11 +45,30 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
auto resourceSize = Size(960, 640);
|
||||
searchPaths.push_back("hd");
|
||||
searchPaths.push_back("hd/scenetest");
|
||||
searchPaths.push_back("hd/scenetest/ArmatureComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/AttributeComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/BackgroundComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/EffectComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/loadSceneEdtiorFileTest");
|
||||
searchPaths.push_back("hd/scenetest/ParticleComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/SpriteComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/TmxMapComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/UIComponentTest");
|
||||
searchPaths.push_back("hd/scenetest/TriggerTest");
|
||||
director->setContentScaleFactor(resourceSize.height/designSize.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
searchPaths.push_back("scenetest");
|
||||
searchPaths.push_back("scenetest/ArmatureComponentTest");
|
||||
searchPaths.push_back("scenetest/AttributeComponentTest");
|
||||
searchPaths.push_back("scenetest/BackgroundComponentTest");
|
||||
searchPaths.push_back("scenetest/EffectComponentTest");
|
||||
searchPaths.push_back("scenetest/loadSceneEdtiorFileTest");
|
||||
searchPaths.push_back("scenetest/ParticleComponentTest");
|
||||
searchPaths.push_back("scenetest/SpriteComponentTest");
|
||||
searchPaths.push_back("scenetest/TmxMapComponentTest");
|
||||
searchPaths.push_back("scenetest/UIComponentTest");
|
||||
searchPaths.push_back("scenetest/TriggerTest");
|
||||
}
|
||||
|
||||
pFileUtils->setSearchPaths(searchPaths);
|
||||
|
|
|
@ -245,7 +245,6 @@ cocos2d::Node* loadSceneEdtiorFileTest::createGameScene()
|
|||
{
|
||||
return nullptr;
|
||||
}
|
||||
ActionManagerEx::getInstance()->playActionByName("startMenu_1.json","Animation1");
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -474,7 +473,7 @@ cocos2d::Node* TmxMapComponentTest::createGameScene()
|
|||
{
|
||||
return nullptr;
|
||||
}
|
||||
TMXTiledMap *tmxMap = static_cast<TMXTiledMap*>(node->getChildByTag(10015)->getComponent("TMXTiledMap")->getNode());
|
||||
TMXTiledMap *tmxMap = static_cast<TMXTiledMap*>(node->getChildByTag(10015)->getComponent("CCTMXTiledMap")->getNode());
|
||||
ActionInterval *actionTo = SkewTo::create(2, 0.f, 2.f);
|
||||
ActionInterval *rotateTo = RotateTo::create(2, 61.0f);
|
||||
ActionInterval *actionScaleTo = ScaleTo::create(2, -0.44f, 0.47f);
|
||||
|
@ -586,7 +585,7 @@ cocos2d::Node* EffectComponentTest::createGameScene()
|
|||
return nullptr;
|
||||
}
|
||||
_node = node;
|
||||
Armature *pAr = static_cast<Armature*>(_node->getChildByTag(10015)->getComponent("Armature")->getNode());
|
||||
Armature *pAr = static_cast<Armature*>(_node->getChildByTag(10015)->getComponent("CCArmature")->getNode());
|
||||
pAr->getAnimation()->setMovementEventCallFunc(CC_CALLBACK_0(EffectComponentTest::animationEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
return node;
|
||||
}
|
||||
|
@ -648,7 +647,6 @@ cocos2d::Node* BackgroundComponentTest::createGameScene()
|
|||
{
|
||||
return nullptr;
|
||||
}
|
||||
ActionManagerEx::getInstance()->playActionByName("startMenu_1.json","Animation1");
|
||||
|
||||
ComAudio *Audio = static_cast<ComAudio*>(node->getComponent("CCBackgroundAudio"));
|
||||
Audio->playBackgroundMusic();
|
||||
|
|
Loading…
Reference in New Issue