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

238 lines
6.3 KiB
C
Raw Normal View History

2015-02-11 18:14:22 +08:00
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
2021-12-28 16:06:23 +08:00
2022-02-24 18:45:25 +08:00
https://adxeproject.github.io/
2021-12-28 16:06:23 +08:00
2015-02-11 18:14:22 +08:00
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
2021-12-28 16:06:23 +08:00
2015-02-11 18:14:22 +08:00
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
2021-12-28 16:06:23 +08:00
2015-02-11 18:14:22 +08:00
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef _PARTICLE3D_TEST_H_
#define _PARTICLE3D_TEST_H_
#include "../BaseTest.h"
2015-02-12 17:54:27 +08:00
#include "Particle3D/CCParticleSystem3D.h"
2015-02-11 18:14:22 +08:00
#include <string>
DEFINE_TEST_SUITE(Particle3DTests);
class Particle3DTestDemo : public TestCase
2015-02-11 18:14:22 +08:00
{
public:
CREATE_FUNC(Particle3DTestDemo);
Particle3DTestDemo();
virtual ~Particle3DTestDemo();
2021-12-28 16:06:23 +08:00
2015-02-11 18:14:22 +08:00
// overrides
virtual bool init() override;
virtual std::string title() const override;
virtual void update(float delta) override;
2021-12-28 16:06:23 +08:00
void onTouchesBegan(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
2015-02-11 18:14:22 +08:00
protected:
2021-12-28 16:06:23 +08:00
std::string _title;
cocos2d::Camera* _camera;
cocos2d::Label* _particleLab;
2015-02-11 18:14:22 +08:00
float _angle;
};
class Particle3DAdvancedLodSystemDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DAdvancedLodSystemDemo);
Particle3DAdvancedLodSystemDemo(){};
virtual ~Particle3DAdvancedLodSystemDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DBlackHoleDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DBlackHoleDemo);
Particle3DBlackHoleDemo(){};
virtual ~Particle3DBlackHoleDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DHypnoDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DHypnoDemo);
Particle3DHypnoDemo(){};
virtual ~Particle3DHypnoDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DTimeShiftDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DTimeShiftDemo);
Particle3DTimeShiftDemo(){};
virtual ~Particle3DTimeShiftDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DUVAnimDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DUVAnimDemo);
Particle3DUVAnimDemo(){};
virtual ~Particle3DUVAnimDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DFirePlaceDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DFirePlaceDemo);
Particle3DFirePlaceDemo(){};
virtual ~Particle3DFirePlaceDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DLineStreakDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DLineStreakDemo);
Particle3DLineStreakDemo(){};
virtual ~Particle3DLineStreakDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DElectricBeamSystemDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DElectricBeamSystemDemo);
Particle3DElectricBeamSystemDemo(){};
virtual ~Particle3DElectricBeamSystemDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
2015-03-02 13:07:32 +08:00
class Particle3DFlareShieldDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DFlareShieldDemo);
Particle3DFlareShieldDemo(){};
virtual ~Particle3DFlareShieldDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DLightningBoltDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DLightningBoltDemo);
Particle3DLightningBoltDemo(){};
virtual ~Particle3DLightningBoltDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DExplosionSystemDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DExplosionSystemDemo);
Particle3DExplosionSystemDemo(){};
virtual ~Particle3DExplosionSystemDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DCanOfWormsDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DCanOfWormsDemo);
Particle3DCanOfWormsDemo(){};
virtual ~Particle3DCanOfWormsDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DRibbonTrailDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DRibbonTrailDemo);
Particle3DRibbonTrailDemo(){};
virtual ~Particle3DRibbonTrailDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DWeaponTrailDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DWeaponTrailDemo);
Particle3DWeaponTrailDemo(){};
virtual ~Particle3DWeaponTrailDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
class Particle3DWithMeshRendererDemo : public Particle3DTestDemo
{
public:
CREATE_FUNC(Particle3DWithMeshRendererDemo);
Particle3DWithMeshRendererDemo(){};
virtual ~Particle3DWithMeshRendererDemo(){};
virtual std::string subtitle() const override;
virtual bool init() override;
};
2015-02-11 18:14:22 +08:00
#endif