axmol/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioActionTimelineTest/ActionTimelineTestScene.h

146 lines
3.2 KiB
C
Raw Normal View History

2014-06-11 11:10:07 +08:00
#ifndef __ANIMATION_TEST_SCENE_H__
#define __ANIMATION_TEST_SCENE_H__
#include "cocos2d.h"
#include "../../BaseTest.h"
2014-06-11 11:10:07 +08:00
#include "cocostudio/CocoStudio.h"
class CocoStudioActionTimelineTests : public TestSuite
2014-06-11 11:10:07 +08:00
{
public:
CocoStudioActionTimelineTests();
~CocoStudioActionTimelineTests();
2014-06-11 11:10:07 +08:00
};
class ActionTimelineBaseTest : public TestCase
2014-06-11 11:10:07 +08:00
{
public:
virtual std::string title() const;
virtual bool init() override;
2014-06-11 11:10:07 +08:00
// overrides
virtual void onExit() override;
protected:
};
class TestActionTimeline : public ActionTimelineBaseTest
2014-06-11 11:10:07 +08:00
{
public:
CREATE_FUNC(TestActionTimeline);
virtual void onEnter() override;
2014-06-11 11:10:07 +08:00
virtual std::string title() const override;
};
class TestChangePlaySection : public ActionTimelineBaseTest
2014-06-17 15:57:30 +08:00
{
public:
CREATE_FUNC(TestChangePlaySection);
virtual void onEnter() override;
2014-06-17 15:57:30 +08:00
virtual std::string title() const override;
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
2014-06-17 15:57:30 +08:00
protected:
cocostudio::timeline::ActionTimeline* action;
2014-06-17 15:57:30 +08:00
};
class TestTimelineFrameEvent : public ActionTimelineBaseTest
2014-06-18 11:22:38 +08:00
{
public:
CREATE_FUNC(TestTimelineFrameEvent);
virtual void onEnter() override;
2014-06-18 11:22:38 +08:00
virtual std::string title() const override;
void onFrameEvent(cocostudio::timeline::Frame* frame);
2014-06-18 11:22:38 +08:00
};
class TestTimelinePerformance : public ActionTimelineBaseTest
2014-06-17 11:13:46 +08:00
{
public:
CREATE_FUNC(TestTimelinePerformance);
virtual void onEnter() override;
2014-06-17 11:13:46 +08:00
virtual std::string title() const override;
};
class TestTimelineAnimationList : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestTimelineAnimationList);
virtual void onEnter() override;
virtual std::string title() const override;
};
class TestTimelineProjectNode : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestTimelineProjectNode);
virtual void onEnter() override;
virtual std::string title() const override;
};
class TestProjectNodeForSimulator : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestProjectNodeForSimulator);
virtual void onEnter() override;
virtual std::string title() const override;
};
class TestTimelineNodeLoadedCallback : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestTimelineNodeLoadedCallback);
virtual void onEnter() override;
virtual std::string title() const override;
void nodeLoadedCallback(cocos2d::Ref* sender);
};
2015-04-10 14:52:54 +08:00
class TestActionTimelineEase : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestActionTimelineEase);
virtual void onEnter() override;
virtual std::string title() const override;
};
2015-07-23 11:51:49 +08:00
class TestActionTimelineSkeleton : public ActionTimelineBaseTest
{
public:
CREATE_FUNC(TestActionTimelineSkeleton);
virtual void onEnter() override;
virtual std::string title() const override;
2015-07-23 11:51:49 +08:00
private:
void setAllSubBonesDebugDraw(cocostudio::timeline::SkeletonNode* rootSkeleton, bool isShow);
2015-07-23 11:51:49 +08:00
bool _changedDisplay;
bool _changedDisplays;
bool _isAllBonesDraw;
2015-07-23 11:51:49 +08:00
};
class TestTimelineExtensionData : public ActionTimelineBaseTest
{
public:
2015-07-23 17:04:08 +08:00
CREATE_FUNC(TestTimelineExtensionData);
virtual void onEnter() override;
virtual std::string title() const override;
};
2014-06-20 11:36:48 +08:00
#endif // __ANIMATION_SCENE_H__