2015-02-11 18:14:22 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2013 cocos2d-x.org
|
2018-01-29 16:25:32 +08:00
|
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
https://axys1.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>
|
2015-04-03 14:31:03 +08:00
|
|
|
|
|
|
|
DEFINE_TEST_SUITE(Particle3DTests);
|
|
|
|
|
|
|
|
class Particle3DTestDemo : public TestCase
|
2015-02-11 18:14:22 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(Particle3DTestDemo);
|
2019-07-22 09:38:46 +08:00
|
|
|
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
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
void onTouchesBegan(const std::vector<axis::Touch*>& touches, axis::Event* event);
|
|
|
|
void onTouchesMoved(const std::vector<axis::Touch*>& touches, axis::Event* event);
|
|
|
|
void onTouchesEnded(const std::vector<axis::Touch*>& touches, axis::Event* event);
|
2015-02-11 18:14:22 +08:00
|
|
|
|
|
|
|
protected:
|
2021-12-28 16:06:23 +08:00
|
|
|
std::string _title;
|
2022-07-11 17:50:21 +08:00
|
|
|
axis::Camera* _camera;
|
|
|
|
axis::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;
|
|
|
|
};
|
|
|
|
|
2022-07-05 14:48:46 +08:00
|
|
|
class Particle3DWithMeshRendererDemo : public Particle3DTestDemo
|
2015-03-03 15:10:42 +08:00
|
|
|
{
|
|
|
|
public:
|
2022-07-05 14:48:46 +08:00
|
|
|
CREATE_FUNC(Particle3DWithMeshRendererDemo);
|
|
|
|
Particle3DWithMeshRendererDemo(){};
|
|
|
|
virtual ~Particle3DWithMeshRendererDemo(){};
|
2015-03-03 15:10:42 +08:00
|
|
|
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
2015-02-11 18:14:22 +08:00
|
|
|
#endif
|