// OpenSDK.h
// DaotuTest
//
// Created by mac on 15/12/3.
//
//
#ifndef OpenSDK_h
#define OpenSDK_h
#include "cocos2d.h"
using namespace cocos2d;
class OpenSDK : public CCObject
{
public:
OpenSDK();
~OpenSDK();
static OpenSDK* getInstance();
public:
void showBanner();
void showInstertil();
private:
static OpenSDK* m_instance;
};
#endif /* OpenSDK_h */
#include "OpenSDK.h"
#include "AppController.h"
OpenSDK* OpenSDK::m_instance = NULL;
OpenSDK::OpenSDK()
{
}
OpenSDK::~OpenSDK()
{
if (m_instance)
{
delete m_instance;
m_instance = NULL;
}
}
OpenSDK* OpenSDK::getInstance()
{
if (!m_instance) {
m_instance = new OpenSDK();
}
return m_instance;
}
void OpenSDK::showBanner()
{
AppController* myDelegate = [[UIApplication sharedApplication] delegate];
[myDelegate showGameBanner];
}
void OpenSDK::showInstertil()
{
AppController* myDelegate = [[UIApplication sharedApplication] delegate];
[myDelegate showInterstil];
}