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

282 lines
6.3 KiB
C
Raw Normal View History

/****************************************************************************
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
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
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
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.
****************************************************************************/
2010-08-23 10:17:29 +08:00
#ifndef _EFFECTS_TEST_H_
#define _EFFECTS_TEST_H_
#include "../BaseTest.h"
DEFINE_TEST_SUITE(EffectTests);
class EffectBaseTest : public TestCase
2010-08-23 10:17:29 +08:00
{
2015-07-08 21:56:14 +08:00
public:
EffectBaseTest();
virtual ~EffectBaseTest();
2021-12-28 16:06:23 +08:00
protected:
2015-07-08 22:34:33 +08:00
virtual bool init() override;
2021-12-28 16:06:23 +08:00
virtual cocos2d::ActionInterval* createEffect(float t) { return nullptr; }
2015-07-08 21:56:14 +08:00
void checkAnim(float dt);
2021-12-28 16:06:23 +08:00
virtual bool isRectEffect() { return false; }
virtual std::string title() const override { return _title; };
virtual std::string subtitle() const override { return _subtitle; };
2015-07-08 21:56:14 +08:00
std::string _title;
std::string _subtitle;
2015-07-08 22:34:33 +08:00
cocos2d::NodeGrid* _gridNodeTarget;
2015-07-08 21:56:14 +08:00
};
class Shaky3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(Shaky3DDemo);
Shaky3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class Waves3DDemo : public EffectBaseTest
{
public:
2015-07-08 21:56:14 +08:00
CREATE_FUNC(Waves3DDemo);
Waves3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
2015-07-08 21:56:14 +08:00
class FlipX3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(FlipX3DDemo);
FlipX3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class FlipY3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(FlipY3DDemo);
FlipY3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class Lens3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(Lens3DDemo);
Lens3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class Ripple3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(Ripple3DDemo);
Ripple3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class LiquidDemo : public EffectBaseTest
{
public:
CREATE_FUNC(LiquidDemo);
LiquidDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class WavesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(WavesDemo);
WavesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class TwirlDemo : public EffectBaseTest
{
public:
CREATE_FUNC(TwirlDemo);
TwirlDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class ShakyTiles3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(ShakyTiles3DDemo);
ShakyTiles3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class ShatteredTiles3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(ShatteredTiles3DDemo);
ShatteredTiles3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class ShuffleTilesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(ShuffleTilesDemo);
ShuffleTilesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class FadeOutTRTilesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(FadeOutTRTilesDemo);
FadeOutTRTilesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class FadeOutBLTilesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(FadeOutBLTilesDemo);
FadeOutBLTilesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class FadeOutUpTilesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(FadeOutUpTilesDemo);
FadeOutUpTilesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
2010-08-23 10:17:29 +08:00
};
2015-07-08 21:56:14 +08:00
class FadeOutDownTilesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(FadeOutDownTilesDemo);
FadeOutDownTilesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class TurnOffTilesDemo : public EffectBaseTest
{
public:
CREATE_FUNC(TurnOffTilesDemo);
TurnOffTilesDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class WavesTiles3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(WavesTiles3DDemo);
WavesTiles3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class JumpTiles3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(JumpTiles3DDemo);
JumpTiles3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class SplitRowsDemo : public EffectBaseTest
{
public:
CREATE_FUNC(SplitRowsDemo);
SplitRowsDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class SplitColsDemo : public EffectBaseTest
{
public:
CREATE_FUNC(SplitColsDemo);
SplitColsDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
class PageTurn3DDemo : public EffectBaseTest
{
public:
CREATE_FUNC(PageTurn3DDemo);
PageTurn3DDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 21:56:14 +08:00
protected:
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
2015-07-08 22:34:33 +08:00
class PageTurn3DRectDemo : public EffectBaseTest
{
public:
CREATE_FUNC(PageTurn3DRectDemo);
PageTurn3DRectDemo();
2021-12-28 16:06:23 +08:00
2015-07-08 22:34:33 +08:00
protected:
2021-12-28 16:06:23 +08:00
virtual bool isRectEffect() override { return true; }
2015-07-08 22:34:33 +08:00
virtual cocos2d::ActionInterval* createEffect(float t) override;
};
2010-08-23 10:17:29 +08:00
#endif