You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.7 KiB
68 lines
1.7 KiB
|
|
declare module ZYSDK {
|
|
|
|
class ZYSDK {
|
|
/**
|
|
* 初始化sdk
|
|
*/
|
|
static initSdk();
|
|
|
|
/**
|
|
*
|
|
* @param isFinish 视频是否播完
|
|
*/
|
|
static reportVideo(isFinish: boolean);
|
|
|
|
/**
|
|
*
|
|
* @param action 用户行为
|
|
*/
|
|
static reportUserAction(action: string);
|
|
|
|
/**
|
|
* 上报游戏内打点数据,用于投放优化
|
|
* @param task 任务、关卡等,由游戏自定义
|
|
* @param action 玩家游戏内行为,如点击开始按钮,进入某某场景,成功通关,等游戏内的一些操作,由游戏自定义
|
|
* @param isAD 本次行为是否是广告行为,true:是广告;false:非广告
|
|
*/
|
|
static reportUserAction2(task: string, action: string, isAD: boolean);
|
|
|
|
/**
|
|
*
|
|
* 获取关卡顺序
|
|
*/
|
|
static getLevel();
|
|
|
|
|
|
/**
|
|
*
|
|
* 获取userid
|
|
*/
|
|
static getUserId();
|
|
|
|
/**
|
|
* 用户订阅消息后通知后台
|
|
*/
|
|
static subscribe(templateid);
|
|
|
|
/**
|
|
* 是否是广告玩家,只有玩家首次通过广告点击进入游戏时有效
|
|
*/
|
|
static isAdUser();
|
|
|
|
/**
|
|
* 玩家首次登录场景,0: 自然流量; 1: 广告投放
|
|
*/
|
|
static getScenes();
|
|
|
|
/**
|
|
* 获取玩家游戏数据
|
|
*/
|
|
static getGameData(onSuccess: Function, onFail: Function);
|
|
|
|
/**
|
|
* 保存玩家游戏数据
|
|
*/
|
|
static setGameData(gamedata:string, onSuccess: Function, onFail: Function);
|
|
}
|
|
} |