2014-10-09 18:30:39 +08:00
|
|
|
#ifndef __AssetsManagerEx_Test_H__
|
|
|
|
#define __AssetsManagerEx_Test_H__
|
|
|
|
|
|
|
|
#include "extensions/cocos-ext.h"
|
|
|
|
#include "../../BaseTest.h"
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
DEFINE_TEST_SUITE(AssetsManagerExTests);
|
2014-10-09 18:30:39 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class AssetsManagerExLoaderScene : public TestCase
|
2014-10-09 18:30:39 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
static AssetsManagerExLoaderScene* create(int testIndex);
|
2014-10-09 18:30:39 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
AssetsManagerExLoaderScene(int testIndex);
|
2014-10-09 18:30:39 +08:00
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
void startDownloadCallback(cocos2d::Ref* sender);
|
2015-04-03 14:31:03 +08:00
|
|
|
|
2015-07-15 12:04:48 +08:00
|
|
|
virtual std::string title() const override;
|
2015-04-03 14:31:03 +08:00
|
|
|
|
|
|
|
virtual bool init() override;
|
2014-10-09 18:30:39 +08:00
|
|
|
virtual void onExit() override;
|
|
|
|
|
|
|
|
private:
|
2015-04-03 14:31:03 +08:00
|
|
|
int _testIndex;
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Layer* _loadLayer;
|
|
|
|
cocos2d::Menu* _downloadMenu;
|
2015-04-03 14:31:03 +08:00
|
|
|
|
2015-04-09 12:23:47 +08:00
|
|
|
cocos2d::extension::AssetsManagerEx* _am;
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* _progress;
|
2015-04-09 12:23:47 +08:00
|
|
|
cocos2d::extension::EventListenerAssetsManagerEx* _amListener;
|
2015-04-03 14:31:03 +08:00
|
|
|
|
|
|
|
void onLoadEnd();
|
2014-10-09 18:30:39 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* defined(__AssetsManagerEx_Test_H__) */
|