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

124 lines
2.7 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 "../../VisibleRect.h"
#include "../../testBasic.h"
#include "cocostudio/CocoStudio.h"
using namespace cocostudio::timeline;
class ActionTimelineTestScene : public TestScene
2014-06-11 11:10:07 +08:00
{
public:
ActionTimelineTestScene(bool bPortrait = false);
2014-06-11 11:10:07 +08:00
virtual void runThisTest();
// The CallBack for back to the main menu scene
virtual void MainMenuCallback(Ref* pSender);
};
enum {
TEST_ANIMATIONELEMENT = 0,
2014-06-17 15:57:30 +08:00
TEST_CHANGE_PLAY_SECTION,
2014-12-02 16:00:30 +08:00
// TEST_TIMELINE_FRAME_EVENT,
2014-06-17 11:13:46 +08:00
TEST_TIMELINE_PERFORMACE,
TEST_TIMELINEACTION_ANIMATIONLIST,
TEST_TIMELINEPROJECTNODE,
TEST_PROJECTNODEFORSIMALATOR,
TEST_NODELOADEDCALLBACK,
2014-06-11 11:10:07 +08:00
TEST_ANIMATION_LAYER_COUNT
};
class ActionTimelineTestLayer : public Layer
2014-06-11 11:10:07 +08:00
{
public:
virtual std::string title() const;
virtual std::string subtitle() const;
virtual void restartCallback(Ref* pSender);
virtual void nextCallback(Ref* pSender);
virtual void backCallback(Ref* pSender);
// overrides
virtual void onEnter() override;
virtual void onExit() override;
protected:
MenuItemImage *restartItem;
MenuItemImage *nextItem;
MenuItemImage *backItem;
};
class TestActionTimeline : public ActionTimelineTestLayer
2014-06-11 11:10:07 +08:00
{
public:
virtual void onEnter();
virtual std::string title() const override;
};
2014-06-17 15:57:30 +08:00
class TestChangePlaySection : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
protected:
ActionTimeline* action;
};
2014-06-18 11:22:38 +08:00
class TestTimelineFrameEvent : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
void onFrameEvent(Frame* frame);
};
2014-06-17 11:13:46 +08:00
class TestTimelinePerformance : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
};
class TestTimelineAnimationList : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
};
class TestTimelineProjectNode : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
};
class TestProjectNodeForSimulator : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
};
class TestTimelineNodeLoadedCallback : public ActionTimelineTestLayer
{
public:
virtual void onEnter();
virtual std::string title() const override;
void nodeLoadedCallback(cocos2d::Ref* sender);
};
2014-06-20 11:36:48 +08:00
#endif // __ANIMATION_SCENE_H__