sdk=接口完善
parent
fdb4c66ed5
commit
3f54c121b1
File diff suppressed because it is too large
Load Diff
|
@ -33,10 +33,21 @@ namespace GameLogic
|
||||||
|
|
||||||
public class TapDBManager : UnitySingleton<TapDBManager>
|
public class TapDBManager : UnitySingleton<TapDBManager>
|
||||||
{
|
{
|
||||||
|
public static string appId = "";
|
||||||
|
public static string channel = "";
|
||||||
|
public static string version = "";
|
||||||
|
|
||||||
public void Init(string appId, string channel, string version)
|
public void Init(string appId, string channel, string version)
|
||||||
{
|
{
|
||||||
Debug.LogWarning("TapDBManager:Init " + appId);
|
TapDBManager.appId = appId;
|
||||||
|
TapDBManager.channel = channel;
|
||||||
|
TapDBManager.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void OnStart()
|
||||||
|
{
|
||||||
|
Debug.LogWarning("TapDBManager:OnStart " + appId);
|
||||||
TapDB.onStart(appId, channel, version);
|
TapDB.onStart(appId, channel, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,21 @@ namespace GameLogic
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Dictionary<string, object> stringToDic(string s)
|
||||||
|
{
|
||||||
|
Dictionary<string, object> d = new Dictionary<string, object>();
|
||||||
|
string[] kvs = s.Split('|');
|
||||||
|
foreach (string ss in kvs)
|
||||||
|
{
|
||||||
|
string[] kv = ss.Split('#');
|
||||||
|
d.Add(kv[0], kv[1]);
|
||||||
|
|
||||||
|
Debug.Log(kv[0] + "***************" + kv[1]);
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
// 以时间戳校准 SDK 时间
|
// 以时间戳校准 SDK 时间
|
||||||
|
@ -44,7 +59,31 @@ namespace GameLogic
|
||||||
return ThinkingAnalyticsAPI.GetDistinctId();
|
return ThinkingAnalyticsAPI.GetDistinctId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 登录
|
||||||
|
public void Login(string accountId)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("当前accountId = " + accountId);
|
||||||
|
ThinkingAnalyticsAPI.Login(accountId);
|
||||||
|
}
|
||||||
|
// 登出
|
||||||
|
public void Logout()
|
||||||
|
{
|
||||||
|
ThinkingAnalyticsAPI.Logout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 设置
|
// 设置
|
||||||
|
public void SetSuperProperties(string sData)
|
||||||
|
{
|
||||||
|
Dictionary<string, object> data = stringToDic(sData);
|
||||||
|
foreach (string id in data.Keys)
|
||||||
|
{
|
||||||
|
object value = data[id];
|
||||||
|
Debug.Log("value:" + value.ToString());
|
||||||
|
}
|
||||||
|
ThinkingAnalyticsAPI.SetSuperProperties(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void ClearSuperProperties()
|
public void ClearSuperProperties()
|
||||||
{
|
{
|
||||||
|
@ -52,21 +91,6 @@ namespace GameLogic
|
||||||
ThinkingAnalyticsAPI.ClearSuperProperties();
|
ThinkingAnalyticsAPI.ClearSuperProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Dictionary<string, object> stringToDic(string s)
|
|
||||||
{
|
|
||||||
Dictionary<string, object> d = new Dictionary<string, object>();
|
|
||||||
string[] kvs = s.Split('|');
|
|
||||||
foreach(string ss in kvs)
|
|
||||||
{
|
|
||||||
string[] kv = ss.Split('#');
|
|
||||||
d.Add(kv[0], kv[1]);
|
|
||||||
|
|
||||||
Debug.Log(kv[0] +"***************"+ kv[1]);
|
|
||||||
}
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Track(string trackEvent, string trackData)
|
public void Track(string trackEvent, string trackData)
|
||||||
{
|
{
|
||||||
Debug.Log("事件名称:" + trackEvent);
|
Debug.Log("事件名称:" + trackEvent);
|
||||||
|
@ -79,7 +103,7 @@ namespace GameLogic
|
||||||
}
|
}
|
||||||
ThinkingAnalyticsAPI.Track(trackEvent, data);
|
ThinkingAnalyticsAPI.Track(trackEvent, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Debug.Log("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId());
|
// Debug.Log("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId());
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 6088b24b13ed31d4cb512d1068724d3f
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -98,6 +98,7 @@ local ManagerNames = {
|
||||||
--数据中心管理
|
--数据中心管理
|
||||||
"DataCenterService/DataCenterManager",
|
"DataCenterService/DataCenterManager",
|
||||||
"DataCenterService/ThinkingAnalyticsManager",
|
"DataCenterService/ThinkingAnalyticsManager",
|
||||||
|
"DataCenterService/TapDBManager",
|
||||||
-- 云梦祈祷
|
-- 云梦祈祷
|
||||||
"Pray/PrayManager",
|
"Pray/PrayManager",
|
||||||
-- 无尽副本数据
|
-- 无尽副本数据
|
||||||
|
|
|
@ -19,6 +19,7 @@ LOGINREQUEST_IP_S_FIELD = protobuf.FieldDescriptor();
|
||||||
LOGINREQUEST_OPENID_FIELD = protobuf.FieldDescriptor();
|
LOGINREQUEST_OPENID_FIELD = protobuf.FieldDescriptor();
|
||||||
LOGINREQUEST_CHANNEL_S_FIELD = protobuf.FieldDescriptor();
|
LOGINREQUEST_CHANNEL_S_FIELD = protobuf.FieldDescriptor();
|
||||||
LOGINREQUEST_PLATFORM_S_FIELD = protobuf.FieldDescriptor();
|
LOGINREQUEST_PLATFORM_S_FIELD = protobuf.FieldDescriptor();
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD = protobuf.FieldDescriptor();
|
||||||
LOGINRESPONSE = protobuf.Descriptor();
|
LOGINRESPONSE = protobuf.Descriptor();
|
||||||
LOGINRESPONSE_RESULTCODE_FIELD = protobuf.FieldDescriptor();
|
LOGINRESPONSE_RESULTCODE_FIELD = protobuf.FieldDescriptor();
|
||||||
LOGINRESPONSE_NEWTOKEN_FIELD = protobuf.FieldDescriptor();
|
LOGINRESPONSE_NEWTOKEN_FIELD = protobuf.FieldDescriptor();
|
||||||
|
@ -580,11 +581,21 @@ LOGINREQUEST_PLATFORM_S_FIELD.default_value = ""
|
||||||
LOGINREQUEST_PLATFORM_S_FIELD.type = 9
|
LOGINREQUEST_PLATFORM_S_FIELD.type = 9
|
||||||
LOGINREQUEST_PLATFORM_S_FIELD.cpp_type = 9
|
LOGINREQUEST_PLATFORM_S_FIELD.cpp_type = 9
|
||||||
|
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.name = "distinct_id"
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.full_name = ".com.ljsd.jieling.protocols.LoginRequest.distinct_id"
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.number = 13
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.index = 12
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.label = 1
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.has_default_value = false
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.default_value = ""
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.type = 9
|
||||||
|
LOGINREQUEST_DISTINCT_ID_FIELD.cpp_type = 9
|
||||||
|
|
||||||
LOGINREQUEST.name = "LoginRequest"
|
LOGINREQUEST.name = "LoginRequest"
|
||||||
LOGINREQUEST.full_name = ".com.ljsd.jieling.protocols.LoginRequest"
|
LOGINREQUEST.full_name = ".com.ljsd.jieling.protocols.LoginRequest"
|
||||||
LOGINREQUEST.nested_types = {}
|
LOGINREQUEST.nested_types = {}
|
||||||
LOGINREQUEST.enum_types = {}
|
LOGINREQUEST.enum_types = {}
|
||||||
LOGINREQUEST.fields = {LOGINREQUEST_DEVICE_ID_S_FIELD, LOGINREQUEST_IDFA_SOR_IMEI_S_FIELD, LOGINREQUEST_BRAND_TYPE_S_FIELD, LOGINREQUEST_BRAND_S_FIELD, LOGINREQUEST_OS_VERSION_S_FIELD, LOGINREQUEST_DPI_S_FIELD, LOGINREQUEST_OPERATOR_S_FIELD, LOGINREQUEST_NETWORK_S_FIELD, LOGINREQUEST_IP_S_FIELD, LOGINREQUEST_OPENID_FIELD, LOGINREQUEST_CHANNEL_S_FIELD, LOGINREQUEST_PLATFORM_S_FIELD}
|
LOGINREQUEST.fields = {LOGINREQUEST_DEVICE_ID_S_FIELD, LOGINREQUEST_IDFA_SOR_IMEI_S_FIELD, LOGINREQUEST_BRAND_TYPE_S_FIELD, LOGINREQUEST_BRAND_S_FIELD, LOGINREQUEST_OS_VERSION_S_FIELD, LOGINREQUEST_DPI_S_FIELD, LOGINREQUEST_OPERATOR_S_FIELD, LOGINREQUEST_NETWORK_S_FIELD, LOGINREQUEST_IP_S_FIELD, LOGINREQUEST_OPENID_FIELD, LOGINREQUEST_CHANNEL_S_FIELD, LOGINREQUEST_PLATFORM_S_FIELD, LOGINREQUEST_DISTINCT_ID_FIELD}
|
||||||
LOGINREQUEST.is_extendable = false
|
LOGINREQUEST.is_extendable = false
|
||||||
LOGINREQUEST.extensions = {}
|
LOGINREQUEST.extensions = {}
|
||||||
LOGINRESPONSE_RESULTCODE_FIELD.name = "resultCode"
|
LOGINRESPONSE_RESULTCODE_FIELD.name = "resultCode"
|
||||||
|
|
|
@ -1,25 +1,32 @@
|
||||||
TapDBManager = {}
|
TapDBManager = {}
|
||||||
local this = TapDBManager
|
local this = TapDBManager
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
end
|
if AppConst.isSDK then
|
||||||
|
App.TBDMgr:OnStart()
|
||||||
function this.SetUser()
|
end
|
||||||
App.TBDMgr:SetUser()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function this.SetUser(userId)
|
function this.SetUser(userId)
|
||||||
App.TBDMgr:SetUser(userId)
|
if AppConst.isSDK then
|
||||||
|
App.TBDMgr:SetUser(userId)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.SetServer(serverId)
|
function this.SetServer(serverId)
|
||||||
App.TBDMgr:SetUser(serverId)
|
if AppConst.isSDK then
|
||||||
|
App.TBDMgr:SetServer(serverId)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function this.SetLevel(level)
|
function this.SetLevel(level)
|
||||||
App.TBDMgr:SetUser(level)
|
if AppConst.isSDK then
|
||||||
|
App.TBDMgr:SetLevel(level)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function this.onChargeSuccess(orderId, goodsId, amount, currencyType, payment)
|
function this.onChargeSuccess(orderId, goodsId, amount, currencyType, payment)
|
||||||
App.TBDMgr:SetUser(orderId)
|
if AppConst.isSDK then
|
||||||
|
App.TBDMgr:onChargeSuccess(orderId, goodsId, amount, currencyType, payment)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,80 @@
|
||||||
ThinkingAnalyticsManager = {}
|
ThinkingAnalyticsManager = {}
|
||||||
local this = ThinkingAnalyticsManager
|
local this = ThinkingAnalyticsManager
|
||||||
|
|
||||||
|
TA_EVENT = {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local function _DicToStr(data)
|
||||||
|
local index = 1
|
||||||
|
local str = ""
|
||||||
|
for key, value in pairs(data) do
|
||||||
|
if index ~= 1 then
|
||||||
|
str = str .."|"
|
||||||
|
end
|
||||||
|
str = str..tostring(value)
|
||||||
|
end
|
||||||
|
return str
|
||||||
|
end
|
||||||
|
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.Track()
|
-- 设置访客Id
|
||||||
-- local d = Dictionary.New()
|
function this.SetDistinctId(distinctId)
|
||||||
|
if AppConst.isSDK then
|
||||||
|
App.TAMgr:SetDistinctId(distinctId)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取访客Id
|
||||||
|
function this.GetDistinctId(distinctId)
|
||||||
|
if AppConst.isSDK then
|
||||||
|
return App.TAMgr:GetDistinctId(distinctId)
|
||||||
|
end
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
-- d:Add("testKey", "testValue")
|
-- 登录
|
||||||
-- -- App.TAMgr:ClearSuperProperties()
|
function this.Login(accountId)
|
||||||
-- App.TAMgr:Track("test_event", "testKey#testValue")
|
if AppConst.isSDK then
|
||||||
|
App.TAMgr:Login(accountId)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 登出
|
||||||
|
function this.Logout()
|
||||||
|
if AppConst.isSDK then
|
||||||
|
App.TAMgr:Logout()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 静态数据设置
|
||||||
|
local _SuperPropertise = {}
|
||||||
|
function this.SetSuperProperties(data)
|
||||||
|
if AppConst.isSDK then
|
||||||
|
for key, value in pairs(data) do
|
||||||
|
_SuperPropertise[key] = value
|
||||||
|
end
|
||||||
|
|
||||||
|
local sData = _DicToStr(_SuperPropertise)
|
||||||
|
App.TAMgr:SetSuperProperties(sData)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 清除静态数据
|
||||||
|
function this.ClearSuperProperties()
|
||||||
|
if AppConst.isSDK then
|
||||||
|
_SuperPropertise = {}
|
||||||
|
App.TAMgr:ClearSuperProperties()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 打点事件
|
||||||
|
function this.Track(event, data)
|
||||||
|
local dStr = _DicToStr(data)
|
||||||
|
App.TAMgr:Track(event, dStr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ function this.LoginRequest(openId, pt_pid, pt_gid, func)
|
||||||
data.operator_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetOperatorName() or ""
|
data.operator_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetOperatorName() or ""
|
||||||
data.network_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetNetworkType() or ""
|
data.network_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetNetworkType() or ""
|
||||||
data.ip_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetLocalIpAddress() or ""
|
data.ip_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetLocalIpAddress() or ""
|
||||||
|
data.distinct_id = AppConst.isSDK and App.TAMgr:GetDistinctId() or ""
|
||||||
data.openId = openId
|
data.openId = openId
|
||||||
data.channel_s = pt_pid.."#"..pt_gid
|
data.channel_s = pt_pid.."#"..pt_gid
|
||||||
data.platform_s = AppConst.isSDK and "ADR" or "PC"
|
data.platform_s = AppConst.isSDK and "ADR" or "PC"
|
||||||
|
@ -62,6 +63,10 @@ function this.LoginRequest(openId, pt_pid, pt_gid, func)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
AppConst.Token = msg.newToken
|
AppConst.Token = msg.newToken
|
||||||
|
|
||||||
|
-- 打点
|
||||||
|
ThinkingAnalyticsManager.Login(openId)
|
||||||
|
TapDBManager.SetUser(openId)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -85,7 +90,6 @@ function this.PlayerInfoRequest(func)
|
||||||
PlayerManager.exp = msg.player.exp
|
PlayerManager.exp = msg.player.exp
|
||||||
PlayerManager.familyId = msg.player.familyId
|
PlayerManager.familyId = msg.player.familyId
|
||||||
PlayerManager.head = msg.player.head
|
PlayerManager.head = msg.player.head
|
||||||
Log(Language[11423] .. msg.player.head)
|
|
||||||
PlayerManager.frame = msg.player.headFrame == 0 and 80000 or msg.player.headFrame
|
PlayerManager.frame = msg.player.headFrame == 0 and 80000 or msg.player.headFrame
|
||||||
PlayerManager.gold = msg.player.gold
|
PlayerManager.gold = msg.player.gold
|
||||||
PlayerManager.gem = msg.player.gem
|
PlayerManager.gem = msg.player.gem
|
||||||
|
@ -103,7 +107,6 @@ function this.PlayerInfoRequest(func)
|
||||||
PlayerManager.ride = msg.player.ride--坐骑
|
PlayerManager.ride = msg.player.ride--坐骑
|
||||||
PlayerManager.rideLevel = msg.player.rideLevel
|
PlayerManager.rideLevel = msg.player.rideLevel
|
||||||
if msg.player.sex then
|
if msg.player.sex then
|
||||||
Log(Language[11424] .. msg.player.sex)
|
|
||||||
NameManager.SetRoleSex(msg.player.sex)
|
NameManager.SetRoleSex(msg.player.sex)
|
||||||
else
|
else
|
||||||
NameManager.SetRoleSex(ROLE_SEX.BOY)
|
NameManager.SetRoleSex(ROLE_SEX.BOY)
|
||||||
|
@ -141,10 +144,6 @@ function this.PlayerInfoRequest(func)
|
||||||
--临时初始化地图探索的静态数据
|
--临时初始化地图探索的静态数据
|
||||||
MapManager.InitAllMapPgData()
|
MapManager.InitAllMapPgData()
|
||||||
-- WorkShopManager.UpdateWorkShopLvAndExp(msg.player.workLevel,msg.player.workExp)
|
-- WorkShopManager.UpdateWorkShopLvAndExp(msg.player.workLevel,msg.player.workExp)
|
||||||
|
|
||||||
Log("msg.player.curRoomType : " .. msg.player.curRoomType)
|
|
||||||
Log("msg.player.roomAddreess : " .. msg.player.roomAddreess)
|
|
||||||
|
|
||||||
RoomManager.CurRoomType = msg.player.curRoomType
|
RoomManager.CurRoomType = msg.player.curRoomType
|
||||||
RoomManager.RoomAddress = msg.player.roomAddreess
|
RoomManager.RoomAddress = msg.player.roomAddreess
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class AppWrap
|
||||||
L.RegVar("CompressMgr", get_CompressMgr, null);
|
L.RegVar("CompressMgr", get_CompressMgr, null);
|
||||||
L.RegVar("GameMgr", get_GameMgr, null);
|
L.RegVar("GameMgr", get_GameMgr, null);
|
||||||
L.RegVar("TAMgr", get_TAMgr, null);
|
L.RegVar("TAMgr", get_TAMgr, null);
|
||||||
|
L.RegVar("TBDMgr", get_TBDMgr, null);
|
||||||
L.RegVar("ImageDownloadMgr", get_ImageDownloadMgr, null);
|
L.RegVar("ImageDownloadMgr", get_ImageDownloadMgr, null);
|
||||||
L.RegVar("SpeakMgr", get_SpeakMgr, null);
|
L.RegVar("SpeakMgr", get_SpeakMgr, null);
|
||||||
L.RegVar("SDKMgr", get_SDKMgr, null);
|
L.RegVar("SDKMgr", get_SDKMgr, null);
|
||||||
|
@ -241,6 +242,20 @@ public class AppWrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_TBDMgr(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.Push(L, App.TBDMgr);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
static int get_ImageDownloadMgr(IntPtr L)
|
static int get_ImageDownloadMgr(IntPtr L)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
//this source code was auto-generated by tolua#, do not modify it
|
||||||
|
using System;
|
||||||
|
using LuaInterface;
|
||||||
|
|
||||||
|
public class GameCore_UnitySingleton_GameLogic_TapDBManagerWrap
|
||||||
|
{
|
||||||
|
public static void Register(LuaState L)
|
||||||
|
{
|
||||||
|
L.BeginClass(typeof(GameCore.UnitySingleton<GameLogic.TapDBManager>), typeof(UnityEngine.MonoBehaviour), "UnitySingleton_GameLogic_TapDBManager");
|
||||||
|
L.RegFunction("__eq", op_Equality);
|
||||||
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||||
|
L.RegVar("Instance", get_Instance, null);
|
||||||
|
L.EndClass();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int op_Equality(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
|
||||||
|
bool o = arg0 == arg1;
|
||||||
|
LuaDLL.lua_pushboolean(L, o);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_Instance(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.Push(L, GameCore.UnitySingleton<GameLogic.TapDBManager>.Instance);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d3316b2bd57b3f4091e8d08aa5453e9
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,236 @@
|
||||||
|
//this source code was auto-generated by tolua#, do not modify it
|
||||||
|
using System;
|
||||||
|
using LuaInterface;
|
||||||
|
|
||||||
|
public class GameLogic_TapDBManagerWrap
|
||||||
|
{
|
||||||
|
public static void Register(LuaState L)
|
||||||
|
{
|
||||||
|
L.BeginClass(typeof(GameLogic.TapDBManager), typeof(GameCore.UnitySingleton<GameLogic.TapDBManager>));
|
||||||
|
L.RegFunction("Init", Init);
|
||||||
|
L.RegFunction("OnStart", OnStart);
|
||||||
|
L.RegFunction("SetUser", SetUser);
|
||||||
|
L.RegFunction("SetServer", SetServer);
|
||||||
|
L.RegFunction("SetLevel", SetLevel);
|
||||||
|
L.RegFunction("onChargeSuccess", onChargeSuccess);
|
||||||
|
L.RegFunction("__eq", op_Equality);
|
||||||
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||||
|
L.RegVar("appId", get_appId, set_appId);
|
||||||
|
L.RegVar("channel", get_channel, set_channel);
|
||||||
|
L.RegVar("version", get_version, set_version);
|
||||||
|
L.EndClass();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int Init(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 4);
|
||||||
|
GameLogic.TapDBManager obj = (GameLogic.TapDBManager)ToLua.CheckObject<GameLogic.TapDBManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
string arg1 = ToLua.CheckString(L, 3);
|
||||||
|
string arg2 = ToLua.CheckString(L, 4);
|
||||||
|
obj.Init(arg0, arg1, arg2);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int OnStart(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 1);
|
||||||
|
GameLogic.TapDBManager obj = (GameLogic.TapDBManager)ToLua.CheckObject<GameLogic.TapDBManager>(L, 1);
|
||||||
|
obj.OnStart();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int SetUser(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
GameLogic.TapDBManager obj = (GameLogic.TapDBManager)ToLua.CheckObject<GameLogic.TapDBManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
obj.SetUser(arg0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int SetServer(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
GameLogic.TapDBManager obj = (GameLogic.TapDBManager)ToLua.CheckObject<GameLogic.TapDBManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
obj.SetServer(arg0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int SetLevel(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
GameLogic.TapDBManager obj = (GameLogic.TapDBManager)ToLua.CheckObject<GameLogic.TapDBManager>(L, 1);
|
||||||
|
int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.SetLevel(arg0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int onChargeSuccess(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 6);
|
||||||
|
GameLogic.TapDBManager obj = (GameLogic.TapDBManager)ToLua.CheckObject<GameLogic.TapDBManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
string arg1 = ToLua.CheckString(L, 3);
|
||||||
|
int arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
|
||||||
|
string arg3 = ToLua.CheckString(L, 5);
|
||||||
|
string arg4 = ToLua.CheckString(L, 6);
|
||||||
|
obj.onChargeSuccess(arg0, arg1, arg2, arg3, arg4);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int op_Equality(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
|
||||||
|
bool o = arg0 == arg1;
|
||||||
|
LuaDLL.lua_pushboolean(L, o);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_appId(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LuaDLL.lua_pushstring(L, GameLogic.TapDBManager.appId);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_channel(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LuaDLL.lua_pushstring(L, GameLogic.TapDBManager.channel);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_version(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LuaDLL.lua_pushstring(L, GameLogic.TapDBManager.version);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_appId(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
GameLogic.TapDBManager.appId = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_channel(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
GameLogic.TapDBManager.channel = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_version(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
GameLogic.TapDBManager.version = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 951f20f6dacc9e0429b881a4cdfa7a04
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -8,6 +8,11 @@ public class GameLogic_ThinkingAnalyticsManagerWrap
|
||||||
{
|
{
|
||||||
L.BeginClass(typeof(GameLogic.ThinkingAnalyticsManager), typeof(GameCore.UnitySingleton<GameLogic.ThinkingAnalyticsManager>));
|
L.BeginClass(typeof(GameLogic.ThinkingAnalyticsManager), typeof(GameCore.UnitySingleton<GameLogic.ThinkingAnalyticsManager>));
|
||||||
L.RegFunction("GetDynamicSuperProperties", GetDynamicSuperProperties);
|
L.RegFunction("GetDynamicSuperProperties", GetDynamicSuperProperties);
|
||||||
|
L.RegFunction("SetDistinctId", SetDistinctId);
|
||||||
|
L.RegFunction("GetDistinctId", GetDistinctId);
|
||||||
|
L.RegFunction("Login", Login);
|
||||||
|
L.RegFunction("Logout", Logout);
|
||||||
|
L.RegFunction("SetSuperProperties", SetSuperProperties);
|
||||||
L.RegFunction("ClearSuperProperties", ClearSuperProperties);
|
L.RegFunction("ClearSuperProperties", ClearSuperProperties);
|
||||||
L.RegFunction("Track", Track);
|
L.RegFunction("Track", Track);
|
||||||
L.RegFunction("__eq", op_Equality);
|
L.RegFunction("__eq", op_Equality);
|
||||||
|
@ -32,6 +37,90 @@ public class GameLogic_ThinkingAnalyticsManagerWrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int SetDistinctId(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
GameLogic.ThinkingAnalyticsManager obj = (GameLogic.ThinkingAnalyticsManager)ToLua.CheckObject<GameLogic.ThinkingAnalyticsManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
obj.SetDistinctId(arg0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int GetDistinctId(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 1);
|
||||||
|
GameLogic.ThinkingAnalyticsManager obj = (GameLogic.ThinkingAnalyticsManager)ToLua.CheckObject<GameLogic.ThinkingAnalyticsManager>(L, 1);
|
||||||
|
string o = obj.GetDistinctId();
|
||||||
|
LuaDLL.lua_pushstring(L, o);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int Login(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
GameLogic.ThinkingAnalyticsManager obj = (GameLogic.ThinkingAnalyticsManager)ToLua.CheckObject<GameLogic.ThinkingAnalyticsManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
obj.Login(arg0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int Logout(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 1);
|
||||||
|
GameLogic.ThinkingAnalyticsManager obj = (GameLogic.ThinkingAnalyticsManager)ToLua.CheckObject<GameLogic.ThinkingAnalyticsManager>(L, 1);
|
||||||
|
obj.Logout();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int SetSuperProperties(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
GameLogic.ThinkingAnalyticsManager obj = (GameLogic.ThinkingAnalyticsManager)ToLua.CheckObject<GameLogic.ThinkingAnalyticsManager>(L, 1);
|
||||||
|
string arg0 = ToLua.CheckString(L, 2);
|
||||||
|
obj.SetSuperProperties(arg0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
static int ClearSuperProperties(IntPtr L)
|
static int ClearSuperProperties(IntPtr L)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,6 +38,7 @@ public static class LuaBinder
|
||||||
GameCore_UnitySingleton_AppWrap.Register(L);
|
GameCore_UnitySingleton_AppWrap.Register(L);
|
||||||
GameCore_UnitySingleton_GameLogic_GameManagerWrap.Register(L);
|
GameCore_UnitySingleton_GameLogic_GameManagerWrap.Register(L);
|
||||||
GameCore_UnitySingleton_GameLogic_ThinkingAnalyticsManagerWrap.Register(L);
|
GameCore_UnitySingleton_GameLogic_ThinkingAnalyticsManagerWrap.Register(L);
|
||||||
|
GameCore_UnitySingleton_GameLogic_TapDBManagerWrap.Register(L);
|
||||||
GameCore_UnitySingleton_GameLogic_LuaManagerWrap.Register(L);
|
GameCore_UnitySingleton_GameLogic_LuaManagerWrap.Register(L);
|
||||||
GameCore_UnitySingleton_GameLogic_NetworkManagerWrap.Register(L);
|
GameCore_UnitySingleton_GameLogic_NetworkManagerWrap.Register(L);
|
||||||
GameCore_Singleton_GameLogic_ResourcesManagerWrap.Register(L);
|
GameCore_Singleton_GameLogic_ResourcesManagerWrap.Register(L);
|
||||||
|
@ -245,6 +246,7 @@ public static class LuaBinder
|
||||||
GameLogic_LuaBehaviourWrap.Register(L);
|
GameLogic_LuaBehaviourWrap.Register(L);
|
||||||
GameLogic_GameManagerWrap.Register(L);
|
GameLogic_GameManagerWrap.Register(L);
|
||||||
GameLogic_ThinkingAnalyticsManagerWrap.Register(L);
|
GameLogic_ThinkingAnalyticsManagerWrap.Register(L);
|
||||||
|
GameLogic_TapDBManagerWrap.Register(L);
|
||||||
GameLogic_LuaManagerWrap.Register(L);
|
GameLogic_LuaManagerWrap.Register(L);
|
||||||
GameLogic_NetworkManagerWrap.Register(L);
|
GameLogic_NetworkManagerWrap.Register(L);
|
||||||
GameLogic_ResourcesManagerWrap.Register(L);
|
GameLogic_ResourcesManagerWrap.Register(L);
|
||||||
|
|
Loading…
Reference in New Issue