Merge pull request #13480 from geron-cn/v3.8

add blendfunc Frame test case
This commit is contained in:
pandamicro 2015-08-20 18:02:40 +08:00
commit 918d7ce5d6
3 changed files with 27 additions and 1 deletions

View File

@ -23,6 +23,7 @@ CocoStudioActionTimelineTests::CocoStudioActionTimelineTests()
ADD_TEST_CASE(TestActionTimelineEase);
ADD_TEST_CASE(TestActionTimelineSkeleton);
ADD_TEST_CASE(TestTimelineExtensionData);
ADD_TEST_CASE(TestActionTimelineBlendFuncFrame);
}
CocoStudioActionTimelineTests::~CocoStudioActionTimelineTests()
@ -577,4 +578,22 @@ void TestTimelineExtensionData::onEnter()
std::string TestTimelineExtensionData::title() const
{
return "Test Timeline extension data";
}
}
// TestActionTimelineBlendFuncFrame
void TestActionTimelineBlendFuncFrame::onEnter()
{
ActionTimelineBaseTest::onEnter();
Node* node = CSLoader::createNode("ActionTimeline/skeletonBlendFuncFrame.csb");
ActionTimeline* action = CSLoader::createTimeline("ActionTimeline/skeletonBlendFuncFrame.csb");
node->runAction(action);
node->setScale(0.2f);
node->setPosition(VisibleRect::center());
this->addChild(node);
action->gotoFrameAndPlay(0);
}
std::string TestActionTimelineBlendFuncFrame::title() const
{
return "Test ActionTimeline BlendFunc Frame";
}

View File

@ -139,4 +139,11 @@ public:
virtual std::string title() const override;
};
class TestActionTimelineBlendFuncFrame : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestActionTimelineBlendFuncFrame);
virtual void onEnter() override;
virtual std::string title() const override;
};
#endif // __ANIMATION_SCENE_H__