2013-12-05 08:26:21 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2013 cocos2d-x.org
|
|
|
|
|
|
|
|
http://www.cocos2d-x.org
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
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.
|
|
|
|
****************************************************************************/
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
#ifndef _SPRITE_TEST_H_
|
|
|
|
#define _SPRITE_TEST_H_
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
#include <string>
|
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
class SpriteTestDemo : public BaseTest
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
std::string _title;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
SpriteTestDemo(void);
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteTestDemo(void);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2014-02-20 10:53:49 +08:00
|
|
|
void restartCallback(Ref* sender);
|
|
|
|
void nextCallback(Ref* sender);
|
|
|
|
void backCallback(Ref* sender);
|
2013-12-19 05:52:10 +08:00
|
|
|
|
|
|
|
// overrides
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
virtual void onEnter() override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class Sprite1 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Sprite1);
|
2012-04-19 14:35:52 +08:00
|
|
|
Sprite1();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2014-05-15 01:07:09 +08:00
|
|
|
void addNewSpriteWithCoords(Vec2 p);
|
2013-09-03 18:22:03 +08:00
|
|
|
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNode1: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNode1);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNode1();
|
2014-05-15 01:07:09 +08:00
|
|
|
void addNewSpriteWithCoords(Vec2 p);
|
2013-10-23 16:14:03 +08:00
|
|
|
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteColorOpacity : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteColorOpacity);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteColorOpacity();
|
2012-06-08 13:55:28 +08:00
|
|
|
void removeAndAddSprite(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeColorOpacity : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeColorOpacity);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeColorOpacity();
|
2012-06-08 13:55:28 +08:00
|
|
|
void removeAndAddSprite(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteZOrder : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteZOrder);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteZOrder();
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprite(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int _dir;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeZOrder: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeZOrder);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeZOrder();
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprite(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int _dir;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeReorder : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeReorder);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeReorder();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeReorderIssue744: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeReorderIssue744);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeReorderIssue744();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeReorderIssue766 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeReorderIssue766);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeReorderIssue766();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprite(float dt);
|
2013-06-20 14:17:10 +08:00
|
|
|
Sprite* makeSpriteZ(int aZ);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
private:
|
2013-06-20 14:17:10 +08:00
|
|
|
SpriteBatchNode *batchNode;
|
|
|
|
Sprite *sprite1;
|
|
|
|
Sprite *sprite2;
|
|
|
|
Sprite *sprite3;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeReorderIssue767 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeReorderIssue767);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeReorderIssue767();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprites(float dt);
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteZVertex: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteZVertex);
|
|
|
|
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteZVertex();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int _dir;
|
|
|
|
float _time;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeZVertex: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeZVertex);
|
|
|
|
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeZVertex();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int _dir;
|
|
|
|
float _time;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteAnchorPoint : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteAnchorPoint);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteAnchorPoint();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeAnchorPoint : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeAnchorPoint);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeAnchorPoint();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class Sprite6 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Sprite6);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
Sprite6();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteFlip : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteFlip);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteFlip();
|
2012-06-08 13:55:28 +08:00
|
|
|
void flipSprites(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeFlip : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeFlip);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeFlip();
|
2012-06-08 13:55:28 +08:00
|
|
|
void flipSprites(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteAliased : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteAliased);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteAliased();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeAliased : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeAliased);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeAliased();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteNewTexture : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteNewTexture);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteNewTexture();
|
|
|
|
virtual ~SpriteNewTexture();
|
|
|
|
void addNewSprite();
|
2013-09-03 18:22:03 +08:00
|
|
|
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool _usingTexture1;
|
|
|
|
Texture2D *_texture1;
|
|
|
|
Texture2D *_texture2;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeNewTexture : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeNewTexture);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeNewTexture();
|
|
|
|
virtual ~SpriteBatchNodeNewTexture();
|
|
|
|
void addNewSprite();
|
2013-09-03 18:22:03 +08:00
|
|
|
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Texture2D* _texture1;
|
|
|
|
Texture2D* _texture2;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteFrameTest: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteFrameTest);
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-06-08 13:55:28 +08:00
|
|
|
void startIn05Secs(float dt);
|
|
|
|
void flipSprites(float dt);
|
2012-04-19 14:35:52 +08:00
|
|
|
private:
|
2013-11-14 09:36:33 +08:00
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
Sprite *_sprite1;
|
|
|
|
Sprite *_sprite2;
|
2013-06-15 14:03:30 +08:00
|
|
|
int _counter;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteFrameAliasNameTest : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteFrameAliasNameTest);
|
|
|
|
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteOffsetAnchorRotation: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorRotation);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteOffsetAnchorRotation();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeOffsetAnchorRotation: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorRotation);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorRotation();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteOffsetAnchorScale: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorScale);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteOffsetAnchorScale();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeOffsetAnchorScale: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorScale);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorScale();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteOffsetAnchorSkew : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorSkew);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteOffsetAnchorSkew();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteOffsetAnchorSkew();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2012-11-20 15:19:57 +08:00
|
|
|
class SpriteOffsetAnchorRotationalSkew : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorRotationalSkew);
|
2012-11-20 15:19:57 +08:00
|
|
|
SpriteOffsetAnchorRotationalSkew();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteOffsetAnchorRotationalSkew();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 15:19:57 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class SpriteBatchNodeOffsetAnchorSkew : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorSkew);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorSkew();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeOffsetAnchorSkew();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2012-11-20 15:19:57 +08:00
|
|
|
class SpriteOffsetAnchorRotationalSkewScale : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorRotationalSkewScale);
|
2012-11-20 15:19:57 +08:00
|
|
|
SpriteOffsetAnchorRotationalSkewScale();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteOffsetAnchorRotationalSkewScale();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 15:19:57 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeOffsetAnchorRotationalSkew : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorRotationalSkew);
|
2012-11-20 15:19:57 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorRotationalSkew();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeOffsetAnchorRotationalSkew();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 15:19:57 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class SpriteOffsetAnchorSkewScale : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorSkewScale);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteOffsetAnchorSkewScale();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteOffsetAnchorSkewScale();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeOffsetAnchorSkewScale : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorSkewScale);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorSkewScale();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeOffsetAnchorSkewScale();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2012-11-20 15:19:57 +08:00
|
|
|
class SpriteBatchNodeOffsetAnchorRotationalSkewScale : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorRotationalSkewScale);
|
2012-11-20 15:19:57 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorRotationalSkewScale();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeOffsetAnchorRotationalSkewScale();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 15:19:57 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class SpriteOffsetAnchorFlip : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteOffsetAnchorFlip);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteOffsetAnchorFlip();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteOffsetAnchorFlip();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeOffsetAnchorFlip : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeOffsetAnchorFlip);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeOffsetAnchorFlip();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeOffsetAnchorFlip();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteAnimationSplit : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteAnimationSplit);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteAnimationSplit();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteHybrid: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteHybrid);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteHybrid();
|
2012-06-08 13:55:28 +08:00
|
|
|
void reparentSprite(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
bool _usingSpriteBatchNode;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeChildren: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeChildren);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeChildren();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeChildrenZ : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeChildrenZ);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeChildrenZ();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteChildrenVisibility: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteChildrenVisibility);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteChildrenVisibility();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteChildrenVisibilityIssue665 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteChildrenVisibilityIssue665);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteChildrenVisibilityIssue665();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteChildrenVisibilityIssue665();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteChildrenAnchorPoint: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteChildrenAnchorPoint);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteChildrenAnchorPoint();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeChildrenAnchorPoint: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeChildrenAnchorPoint);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeChildrenAnchorPoint();
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeChildrenScale: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeChildrenScale);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeChildrenScale();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteChildrenChildren: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteChildrenChildren);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteChildrenChildren();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class SpriteBatchNodeChildrenChildren: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeChildrenChildren);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeChildrenChildren();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteNilTexture: public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteNilTexture);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteNilTexture();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteSubclass : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteSubclass);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteSubclass();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2013-06-20 14:04:44 +08:00
|
|
|
class AnimationCacheTest : public SpriteTestDemo
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(AnimationCacheTest);
|
2013-06-20 14:04:44 +08:00
|
|
|
AnimationCacheTest();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class NodeSort : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(NodeSort);
|
2012-04-19 14:35:52 +08:00
|
|
|
NodeSort();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprite(float dt);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
private:
|
2013-06-20 14:17:10 +08:00
|
|
|
Node *_node;
|
|
|
|
Sprite *_sprite1;
|
|
|
|
Sprite *_sprite2;
|
|
|
|
Sprite *_sprite3;
|
|
|
|
Sprite *_sprite4;
|
|
|
|
Sprite *_sprite5;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeReorderSameIndex : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeReorderSameIndex);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeReorderSameIndex();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprite(float dt);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
private:
|
2013-06-20 14:17:10 +08:00
|
|
|
SpriteBatchNode *_batchNode;
|
|
|
|
Sprite *_sprite1;
|
|
|
|
Sprite *_sprite2;
|
|
|
|
Sprite *_sprite3;
|
|
|
|
Sprite *_sprite4;
|
|
|
|
Sprite *_sprite5;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeReorderOneChild : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeReorderOneChild);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeReorderOneChild();
|
2012-06-08 13:55:28 +08:00
|
|
|
void reorderSprite(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
private:
|
2013-06-20 14:17:10 +08:00
|
|
|
SpriteBatchNode *_batchNode;
|
|
|
|
Sprite *_reorderSprite;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchNodeSkewNegativeScaleChildren : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeSkewNegativeScaleChildren);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchNodeSkewNegativeScaleChildren();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeSkewNegativeScaleChildren();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2012-11-20 15:19:57 +08:00
|
|
|
class SpriteBatchNodeRotationalSkewNegativeScaleChildren : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchNodeRotationalSkewNegativeScaleChildren);
|
2012-11-20 15:19:57 +08:00
|
|
|
SpriteBatchNodeRotationalSkewNegativeScaleChildren();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteBatchNodeRotationalSkewNegativeScaleChildren();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 15:19:57 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class SpriteSkewNegativeScaleChildren : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteSkewNegativeScaleChildren);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteSkewNegativeScaleChildren();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteSkewNegativeScaleChildren();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2012-11-20 15:19:57 +08:00
|
|
|
class SpriteRotationalSkewNegativeScaleChildren : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteRotationalSkewNegativeScaleChildren);
|
2012-11-20 15:19:57 +08:00
|
|
|
SpriteRotationalSkewNegativeScaleChildren();
|
2014-01-03 07:51:26 +08:00
|
|
|
virtual ~SpriteRotationalSkewNegativeScaleChildren();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 15:19:57 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class SpriteDoubleResolution : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteDoubleResolution);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteDoubleResolution();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class AnimationCacheFile : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(AnimationCacheFile);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
AnimationCacheFile();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteBatchBug1217 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(SpriteBatchBug1217);
|
2012-04-19 14:35:52 +08:00
|
|
|
SpriteBatchBug1217();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2014-02-23 09:47:56 +08:00
|
|
|
class SpriteCullTest1 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(SpriteCullTest1);
|
|
|
|
SpriteCullTest1();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SpriteCullTest2 : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(SpriteCullTest2);
|
|
|
|
SpriteCullTest2();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-07-02 03:36:53 +08:00
|
|
|
class Sprite3DRotationTest : public SpriteTestDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(Sprite3DRotationTest);
|
|
|
|
Sprite3DRotationTest();
|
|
|
|
virtual std::string title() const override { return "3D Rotation Test"; };
|
|
|
|
virtual std::string subtitle() const override { return "Rotation should based on the anchor point"; };
|
|
|
|
virtual void update(float delta) override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Sprite* sprite1;
|
|
|
|
Sprite* sprite2;
|
|
|
|
|
|
|
|
Vec3 rotation;
|
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class SpriteTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|