axmol/test_uphone/tests/ParticleTest/ParticleTest.h

205 lines
3.5 KiB
C
Raw Normal View History

2010-08-23 16:38:10 +08:00
#ifndef _PARTICLE_TEST_H_
#define _PARTICLE_TEST_H_
#include "../testBasic.h"
2010-09-01 14:57:55 +08:00
////----#include "cocos2d.h"
2010-08-25 10:26:31 +08:00
// #include "touch_dispatcher/CCTouch.h"
// #include "CCParticleExample.h"
2010-08-23 16:38:10 +08:00
class ParticleTestScene : public TestScene
{
public:
virtual void runThisTest();
};
class ParticleDemo : public CCColorLayer
{
protected:
CCParticleSystem* m_emitter;
CCSprite* m_background;
public:
ParticleDemo(void);
~ParticleDemo(void);
virtual void onEnter(void);
virtual std::string title();
void restartCallback(NSObject* pSender);
void nextCallback(NSObject* pSender);
void backCallback(NSObject* pSender);
void toggleCallback(NSObject* pSender);
virtual void registerWithTouchDispatcher();
virtual bool ccTouchBegan(CCTouch* touch, UIEvent* event);
virtual void ccTouchMoved(CCTouch* touch, UIEvent* event);
virtual void ccTouchEnded(CCTouch* touch, UIEvent* event);
void step(ccTime dt);
void setEmitterPosition();
};
class DemoFirework : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoFire : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoSun : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoGalaxy : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoFlower : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoBigFlower : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoRotFlower : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoMeteor : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoSpiral : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoExplosion : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoSmoke : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoSnow : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoRain : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoModernArt : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class DemoRing : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class ParallaxParticle : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
2010-08-26 09:55:54 +08:00
class DemoParticleFromFile : public ParticleDemo
{
public:
std::string m_title;
DemoParticleFromFile(const char *file)
{
m_title = file;
}
virtual void onEnter();
virtual std::string title()
{
return m_title;
}
};
class RadiusMode1 : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class RadiusMode2 : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
};
class Issue704 : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
virtual std::string subtitle();
};
class Issue870 : public ParticleDemo
{
public:
virtual void onEnter();
virtual std::string title();
virtual std::string subtitle();
void updateQuads(ccTime dt);
private:
int m_nIndex;
};
2010-08-23 16:38:10 +08:00
#endif