2012-03-20 18:07:42 +08:00
|
|
|
#ifndef _ACTIONS__EASE_TEST_H_
|
|
|
|
#define _ACTIONS__EASE_TEST_H_
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
////----#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-06-14 05:19:13 +08:00
|
|
|
USING_NS_CC;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
class EaseSpriteDemo : public BaseTest
|
2010-08-25 17:02:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
protected:
|
2013-06-20 14:17:10 +08:00
|
|
|
Sprite* _grossini;
|
|
|
|
Sprite* _tamara;
|
|
|
|
Sprite* _kathia;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
std::string _title;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
EaseSpriteDemo(void);
|
|
|
|
~EaseSpriteDemo(void);
|
|
|
|
|
|
|
|
virtual std::string title();
|
|
|
|
virtual void onEnter();
|
|
|
|
|
2013-07-26 06:53:24 +08:00
|
|
|
void restartCallback(Object* sender);
|
|
|
|
void nextCallback(Object* sender);
|
|
|
|
void backCallback(Object* sender);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
void positionForTwo();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEase : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
|
2012-06-12 01:43:07 +08:00
|
|
|
void testStopAction(float dt);
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseExponential : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseExponentialInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseSine : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseSineInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseElastic : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseElasticInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBounce : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBounceInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBack : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteEaseBackInOut : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpeedTest : public EaseSpriteDemo
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
void onEnter();
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
|
2012-06-12 01:43:07 +08:00
|
|
|
void altertime(float dt);
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
2012-03-20 18:07:42 +08:00
|
|
|
class ActionsEaseTestScene : public TestScene
|
2010-08-25 17:02:58 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|