axmol/samples/Cpp/TestCpp/Classes/ParallaxTest/ParallaxTest.h

77 lines
1.4 KiB
C
Raw Normal View History

2010-09-01 14:57:55 +08:00
#ifndef _PARALLAX_TEST_H_
#define _PARALLAX_TEST_H_
#include "../testBasic.h"
#include "../BaseTest.h"
class ParallaxDemo : public BaseTest
2010-09-01 14:57:55 +08:00
{
protected:
TextureAtlas* _atlas;
2010-09-01 14:57:55 +08:00
public:
ParallaxDemo(void);
~ParallaxDemo(void);
virtual std::string title() const override;
virtual void onEnter();
2010-09-01 14:57:55 +08:00
void restartCallback(Object* sender);
void nextCallback(Object* sender);
void backCallback(Object* sender);
2010-09-01 14:57:55 +08:00
};
class Parallax1 : public ParallaxDemo
{
protected:
Node* _root;
Node* _target;
MotionStreak* _streak;
public:
Parallax1();
virtual std::string title() const override;
2010-09-01 14:57:55 +08:00
};
class Parallax2 : public ParallaxDemo
{
protected:
Node* _root;
Node* _target;
MotionStreak* _streak;
public:
Parallax2();
void onTouchesMoved(const std::vector<Touch*>& touches, Event *event);
virtual std::string title() const override;
2010-09-01 14:57:55 +08:00
};
class Issue2572 : public ParallaxDemo
{
protected:
ParallaxNode* _paraNode;
float _moveTimer;
float _addTimer;
Vector<Sprite*> _childList;
int _preListSize;
int _printCount;
virtual void update(float dt) override;
public:
Issue2572();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
2010-09-01 14:57:55 +08:00
class ParallaxTestScene : public TestScene
{
public:
virtual void runThisTest();
};
#endif