2010-08-25 17:02:58 +08:00
|
|
|
#ifndef _EASE_ACTIONS_TEST_H_
|
|
|
|
#define _EASE_ACTIONS_TEST_H_
|
|
|
|
|
2010-09-01 14:57:55 +08:00
|
|
|
////----#include "cocos2d.h"
|
2010-08-25 17:02:58 +08:00
|
|
|
#include "../testBasic.h"
|
|
|
|
|
|
|
|
using namespace cocos2d;
|
|
|
|
|
|
|
|
class EaseSpriteDemo : public CCLayer
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
CCSprite* m_grossini;
|
|
|
|
CCSprite* m_tamara;
|
|
|
|
CCSprite* m_kathia;
|
|
|
|
|
|
|
|
std::string m_strTitle;
|
|
|
|
|
|
|
|
public:
|
|
|
|
EaseSpriteDemo(void);
|
|
|
|
~EaseSpriteDemo(void);
|
|
|
|
|
|
|
|
virtual std::string title();
|
|
|
|
virtual void onEnter();
|
|
|
|
|
|
|
|
void restartCallback(NSObject* pSender);
|
|
|
|
void nextCallback(NSObject* pSender);
|
|
|
|
void backCallback(NSObject* pSender);
|
|
|
|
|
|
|
|
void positionForTwo();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEase : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
|
|
|
|
void testStopAction(ccTime dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseExponential : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseExponentialInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseSine : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseSineInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseElastic : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseElasticInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBounce : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBounceInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBack : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBackInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpeedTest : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
|
|
|
|
void altertime(ccTime dt);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class SchedulerTest : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class EaseActionsTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|