2014-06-11 11:10:07 +08:00
|
|
|
#ifndef __ANIMATION_TEST_SCENE_H__
|
|
|
|
#define __ANIMATION_TEST_SCENE_H__
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
2015-04-03 14:31:03 +08:00
|
|
|
#include "../../BaseTest.h"
|
2014-06-11 11:10:07 +08:00
|
|
|
#include "cocostudio/CocoStudio.h"
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class CocoStudioActionTimelineTests : public TestSuite
|
2014-06-11 11:10:07 +08:00
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
public:
|
|
|
|
CocoStudioActionTimelineTests();
|
|
|
|
~CocoStudioActionTimelineTests();
|
2014-06-11 11:10:07 +08:00
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class ActionTimelineBaseTest : public TestCase
|
2014-06-11 11:10:07 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual std::string title() const;
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
virtual bool init() override;
|
2014-06-11 11:10:07 +08:00
|
|
|
|
|
|
|
// overrides
|
|
|
|
virtual void onExit() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestActionTimeline : public ActionTimelineBaseTest
|
2014-06-11 11:10:07 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestActionTimeline);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2014-06-11 11:10:07 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestChangePlaySection : public ActionTimelineBaseTest
|
2014-06-17 15:57:30 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestChangePlaySection);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2014-06-17 15:57:30 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
2014-06-17 15:57:30 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
ActionTimeline* action;
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestTimelineFrameEvent : public ActionTimelineBaseTest
|
2014-06-18 11:22:38 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestTimelineFrameEvent);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2014-06-18 11:22:38 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
void onFrameEvent(Frame* frame);
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestTimelinePerformance : public ActionTimelineBaseTest
|
2014-06-17 11:13:46 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestTimelinePerformance);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2014-06-17 11:13:46 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestTimelineAnimationList : public ActionTimelineBaseTest
|
2015-01-28 02:12:09 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestTimelineAnimationList);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2015-01-28 02:12:09 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestTimelineProjectNode : public ActionTimelineBaseTest
|
2015-01-28 02:12:09 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestTimelineProjectNode);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2015-01-28 02:12:09 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestProjectNodeForSimulator : public ActionTimelineBaseTest
|
2015-01-28 02:12:09 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestProjectNodeForSimulator);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2015-01-28 02:12:09 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TestTimelineNodeLoadedCallback : public ActionTimelineBaseTest
|
2015-03-12 17:36:39 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TestTimelineNodeLoadedCallback);
|
|
|
|
|
2015-03-15 02:33:15 +08:00
|
|
|
virtual void onEnter() override;
|
2015-03-12 17:36:39 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
|
|
|
|
void nodeLoadedCallback(cocos2d::Ref* sender);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2014-06-20 11:36:48 +08:00
|
|
|
#endif // __ANIMATION_SCENE_H__
|