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

238 lines
6.3 KiB
C
Raw Normal View History

2019-11-23 20:27:39 +08:00
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
2022-10-01 16:24:52 +08:00
https://axmolengine.github.io/
2019-11-23 20:27:39 +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:
2019-11-23 20:27:39 +08:00
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
2019-11-23 20:27:39 +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"
#include "Particle3D/CCParticleSystem3D.h"
#include <string>
DEFINE_TEST_SUITE(Particle3DTests);
class Particle3DTestDemo : public TestCase
{
public:
CREATE_FUNC(Particle3DTestDemo);
Particle3DTestDemo();
virtual ~Particle3DTestDemo();
2019-11-23 20:27:39 +08:00
// overrides
virtual bool init() override;
virtual std::string title() const override;
virtual void update(float delta) override;
2022-10-18 19:17:36 +08:00
void onTouchesBegan(const std::vector<ax::Touch*>& touches, ax::Event* event);
void onTouchesMoved(const std::vector<ax::Touch*>& touches, ax::Event* event);
void onTouchesEnded(const std::vector<ax::Touch*>& touches, ax::Event* event);
2019-11-23 20:27:39 +08:00
protected:
std::string _title;
2022-10-18 19:17:36 +08:00
ax::Camera* _camera;
ax::Label* _particleLab;
2019-11-23 20:27:39 +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;
};
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
2019-11-23 20:27:39 +08:00
{
public:
CREATE_FUNC(Particle3DWithMeshRendererDemo);
Particle3DWithMeshRendererDemo(){};
virtual ~Particle3DWithMeshRendererDemo(){};
2019-11-23 20:27:39 +08:00
virtual std::string subtitle() const override;
virtual bool init() override;
};
#endif