#ifndef LYWSDKPlatform_h
#define LYWSDKPlatform_h
#include <stdio.h>
#include <stdlib.h>
#include "LYWSDKPlatformManager.h"
#include "LYWSDKCallBackListener.h"
class LYWSDKPlatform: LYWSDKCallBackListener
{
protected:
LYWSDKPlatform();
~LYWSDKPlatform();
public:
LYWSDKCallBack _allCallBack;
static LYWSDKPlatform* getInstance();
void init(char *jsonParam, LYWSDKCallBack callBack);
void login(char *jsonParam);
void pay(char *jsonParam);
void loop();
virtual void lywSDKCallBack(const char* callBackJsonMessage);
};
#define LYWSDKPlatform_h
#include <stdio.h>
#include <stdlib.h>
#include "LYWSDKPlatformManager.h"
#include "LYWSDKCallBackListener.h"
// 给游戏回调函数指针
typedef void (*LYWSDKCallBack) (const char*);class LYWSDKPlatform: LYWSDKCallBackListener
{
protected:
LYWSDKPlatform();
~LYWSDKPlatform();
public:
LYWSDKCallBack _allCallBack;
static LYWSDKPlatform* getInstance();
void init(char *jsonParam, LYWSDKCallBack callBack);
void login(char *jsonParam);
void pay(char *jsonParam);
void loop();
virtual void lywSDKCallBack(const char* callBackJsonMessage);
};
本文介绍了一个用于游戏开发的平台SDK——LYWSDKPlatform,该SDK提供了初始化、登录、支付等功能,并通过回调机制与游戏进行交互。文中详细展示了类定义及成员函数的实现。
1667

被折叠的 条评论
为什么被折叠?



