IAntiAddictionClient.cs
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using AntiAddictionSDK.Api;
using UnityEngine;
namespace AntiAddictionSDK.Common
{
public interface IAntiAddictionClient
{
// 防沉迷SDK流程结束,可以开始游戏
event EventHandler<EventArgs> ZAASDKCompleted;
// event EventHandler<EventArgs> NoTimeLeftWithTouristsMode;
// 获取用户实名认证状态
// 0: 未实名认证
// 1:已实名认证
int IsAuthenticated();
// 获取当前用户年龄段
// 0 未认证
// 1 成年
// 2 未成年
int AgeGroupOfCurrentUser();
// 获取当前用户剩余可玩时长,如果为-1,表示当前用户为成年人账号,将不受防沉迷限制,如果为大于0的数,返回的为当前用户的剩余可玩时长,单位秒
int LeftTimeOfCurrentUser();
// //设置Android渠道userId(Android 华为,联想渠道需要调用)
// //为兼容华为,联想渠道的防沉迷SDK,当游戏调用华为,联想渠道SDK登录成功,并且获取到了账号Id之后,请调用下面的接口
// void SetChannelUserId(string userId);
// //游戏退到后台时调用(iOS 不需要)
// void GameOnPause();
// //游戏恢复到前台时调用(iOS 不需要)
// void GameOnResume();
// // 暂停计时器
// void StopTimerInUnity();
// // 恢复计时器
// void ResumeTimerInUnity();
// // Android 获取UserCode
// string GetUserCode();
// // Android 设置用户GroupId
// void SetGroupId(int groupId);
// // Android 获取用户GroupId
// int GetGroupId();
// // Android更新用户数据接口
// void UpdateDataReport();
// // Android获取当前用户的分组id,调用此方法后,会通过 event EventHandler<GroupIdEventArgs> OnUserGroupSuccessResult接口返回用户的分组信息
// // zplayId:之前用户系统的zplayId,没有可以传""
// void CheckUserGroupId(string zplayId);
}
}