axmol/tests/cpp-tests/Classes/TouchesTest/TouchesTest.h

35 lines
579 B
C
Raw Normal View History

#ifndef _TOUCHES_TEST__H_
#define _TOUCHES_TEST__H_
#include "../BaseTest.h"
DEFINE_TEST_SUITE(TouchesTests);
class PongScene : public TestCase
2010-08-27 11:53:35 +08:00
{
public:
CREATE_FUNC(PongScene);
virtual bool init() override;
2010-08-27 11:53:35 +08:00
};
class Ball;
class Paddle;
class PongLayer : public cocos2d::Layer
2010-08-27 11:53:35 +08:00
{
2012-05-30 16:55:46 +08:00
private:
Ball* _ball;
cocos2d::Vector<Paddle*> _paddles;
cocos2d::Vec2 _ballStartingVelocity;
2010-08-27 11:53:35 +08:00
public:
CREATE_FUNC(PongLayer);
PongLayer();
~PongLayer();
void resetAndScoreBallForPlayer(int player);
2012-06-12 01:43:07 +08:00
void doStep(float delta);
};
#endif