2010-11-10 17:47:06 +08:00
|
|
|
#ifndef _ACCELEROMETER_TEST_H_
|
|
|
|
#define _ACCELEROMETER_TEST_H_
|
|
|
|
|
|
|
|
#include "../testBasic.h"
|
2011-03-08 13:49:58 +08:00
|
|
|
|
2012-06-14 05:19:13 +08:00
|
|
|
USING_NS_CC;
|
2011-03-08 13:49:58 +08:00
|
|
|
|
2010-11-10 17:47:06 +08:00
|
|
|
class AccelerometerTest: public CCLayer
|
|
|
|
{
|
2011-03-08 13:49:58 +08:00
|
|
|
protected:
|
|
|
|
CCSprite* m_pBall;
|
|
|
|
double m_fLastTime;
|
|
|
|
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
AccelerometerTest(void);
|
|
|
|
~AccelerometerTest(void);
|
2011-03-08 13:49:58 +08:00
|
|
|
|
|
|
|
virtual void didAccelerate(CCAcceleration* pAccelerationValue);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual std::string title();
|
|
|
|
virtual void onEnter();
|
2010-11-10 17:47:06 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class AccelerometerTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|