mirror of https://github.com/axmolengine/axmol.git
Merge pull request #9951 from pipu/update_inneractionframe
Update InnerActionFrame
This commit is contained in:
commit
78e6d2f7ab
|
@ -508,6 +508,13 @@ void InnerActionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
}
|
||||
}
|
||||
|
||||
int duration = _timeline->getActionTimeline()->getDuration();
|
||||
int odddiff = duration - _frameIndex - end + start;
|
||||
if (odddiff < 0)
|
||||
{
|
||||
end += odddiff;
|
||||
}
|
||||
|
||||
if (InnerActionType::NoLoopAction == _innerActionType)
|
||||
{
|
||||
actiontimeline->gotoFrameAndPlay(start, end, false);
|
||||
|
|
|
@ -1129,15 +1129,11 @@ Node* CSLoader::createNodeWithFlatBuffersForSimulator(const std::string& filenam
|
|||
|
||||
// decode plist
|
||||
auto textures = csparsebinary->textures();
|
||||
auto texturePngs = csparsebinary->texturePngs();
|
||||
int textureSize = csparsebinary->textures()->size();
|
||||
// CCLOG("textureSize = %d", textureSize);
|
||||
for (int i = 0; i < textureSize; ++i)
|
||||
{
|
||||
std::string texture = textures->Get(i)->c_str();
|
||||
std::string texturePng = texturePngs->Get(i)->c_str();
|
||||
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(texture,
|
||||
texturePng);
|
||||
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(textures->Get(i)->c_str());
|
||||
}
|
||||
|
||||
auto nodeTree = csparsebinary->nodeTree();
|
||||
|
|
Loading…
Reference in New Issue