遴选提交

zhangqiang 2020-08-15 14:05:11 +08:00
parent d9573982b5
commit ee0d0e8fa4
9 changed files with 67 additions and 10 deletions

View File

@ -20,6 +20,7 @@ namespace SDK
public void PushMessage(Message msg) { lock (messages) { messages.Enqueue(msg); } } public void PushMessage(Message msg) { lock (messages) { messages.Enqueue(msg); } }
public Message PopMessage() { lock (messages) { return messages.Count > 0 ? messages.Dequeue() : null; } } public Message PopMessage() { lock (messages) { return messages.Count > 0 ? messages.Dequeue() : null; } }
public virtual void CustomEvent(string events,string desc, string type) { } public virtual void CustomEvent(string events,string desc, string type) { }
public virtual void NewRoleTutorial(string eventName, string guide_start_time, string guide_end_time, string serverId, string serverName, string roleName, string roleId) { }
} }
} }

View File

@ -127,6 +127,11 @@ namespace SDK
{ {
currentActivity.Call("CustomEvent", events, desc , type); currentActivity.Call("CustomEvent", events, desc , type);
} }
//sdk新手引导上报
public override void NewRoleTutorial(string eventName, string guide_start_time, string guide_end_time, string serverId, string serverName, string roleName, string roleId)
{
currentActivity.Call("NetRoleTutorial", eventName, guide_start_time, guide_end_time, serverId, serverName, roleName, roleId);
}
//登出 //登出
public override void Logout() public override void Logout()
{ {

View File

@ -164,6 +164,11 @@ namespace SDK
{ {
proxy.CustomEvent(events,desc, type); proxy.CustomEvent(events,desc, type);
} }
//sdk 新手引导上报
public void NewRoleTutorial(string eventName, string guide_start_time, string guide_end_time, string serverId, string serverName, string roleName, string roleId)
{
proxy.NewRoleTutorial(eventName, guide_start_time, guide_end_time, serverId, serverName, roleName, roleId);
}
/// <summary> /// <summary>
/// ///////// sdk层回调 /// ///////// sdk层回调
/// </summary> /// </summary>

View File

@ -101,10 +101,10 @@ TextureImporter:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 437 width: 662
height: 583 height: 1249
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []

View File

@ -11460,7 +11460,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 223} m_AnchoredPosition: {x: 0, y: 223}
m_SizeDelta: {x: 437, y: 583} m_SizeDelta: {x: 430, y: 812}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8239642799241069030 --- !u!222 &8239642799241069030
CanvasRenderer: CanvasRenderer:
@ -11490,7 +11490,7 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 7e4a9bc2eff052644a4e9188d42ef59a, type: 3} m_Sprite: {fileID: 21300000, guid: b08152c1b4c2f5e4cb1c294dfcbef0c6, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@ -16696,7 +16696,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 73.1001, y: -26.800049} m_AnchoredPosition: {x: 73.1001, y: -26.800293}
m_SizeDelta: {x: 100, y: 50} m_SizeDelta: {x: 100, y: 50}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9171444830315599766 --- !u!222 &9171444830315599766

View File

@ -24,10 +24,10 @@ local FBSDKCustomEvents = {
} }
function this.SetisFirstLogVal(isDayFirst) function this.SetisFirstLogVal(isDayFirst)
if isDayFirst == 0 then--今天第一次登陆 if isDayFirst == 0 then--今天第一次登陆
LogGreen("埋点上报数据 "..CalculateSecondsNowTo_N_OClock(24).." "..GetTimeStamp().." "..PlayerManager.userCreateTime) -- LogGreen("埋点上报数据 "..CalculateSecondsNowTo_N_OClock(24).." "..GetTimeStamp().." "..PlayerManager.userCreateTime)
local cur24Times = CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp() local cur24Times = CalculateSecondsNowTo_N_OClock(24) + GetTimeStamp()
local day = math.floor((cur24Times - PlayerManager.userCreateTime)/86400) + 1 local day = math.floor((cur24Times - PlayerManager.userCreateTime)/86400) + 1
LogGreen("day "..day) -- LogGreen("day "..day)
--发送埋点数据 --发送埋点数据
this.SendCustomEvents(FBSDKCustomEventType.LoginNum,day) this.SendCustomEvents(FBSDKCustomEventType.LoginNum,day)
end end

View File

@ -125,9 +125,13 @@ function this.ShowGuide(id, ...)
step_id = id, step_id = id,
guild_start_time = math.floor(GetTimeStamp()), guild_start_time = math.floor(GetTimeStamp()),
}) })
if id == -1 then if AppConst.isSDKLogin then
SDKMgr:NewRoleTutorial(tostring(id) ,tostring(math.floor(GetTimeStamp())) ,tostring(math.floor(GetTimeStamp())),
PlayerManager.serverInfo.server_id,PlayerManager.serverInfo.name,PlayerManager.nickName,tostring(PlayerManager.uid))
--发送埋点数据 --发送埋点数据
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FinishGuide,0) if id == -1 then
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FinishGuide,0)
end
end end
-- 引导结束回调 -- 引导结束回调
local function onGuideClose() local function onGuideClose()

View File

@ -9,6 +9,7 @@ public class GameLogic_TapDBManagerWrap
L.BeginClass(typeof(GameLogic.TapDBManager), typeof(GameCore.UnitySingleton<GameLogic.TapDBManager>)); L.BeginClass(typeof(GameLogic.TapDBManager), typeof(GameCore.UnitySingleton<GameLogic.TapDBManager>));
L.RegFunction("Init", Init); L.RegFunction("Init", Init);
L.RegFunction("SetAppId", SetAppId); L.RegFunction("SetAppId", SetAppId);
L.RegFunction("SetChannel", SetChannel);
L.RegFunction("OnStart", OnStart); L.RegFunction("OnStart", OnStart);
L.RegFunction("SetUser", SetUser); L.RegFunction("SetUser", SetUser);
L.RegFunction("SetServer", SetServer); L.RegFunction("SetServer", SetServer);
@ -72,6 +73,23 @@ public class GameLogic_TapDBManagerWrap
} }
} }
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int SetChannel(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.SetChannel(arg0);
return 0;
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int OnStart(IntPtr L) static int OnStart(IntPtr L)
{ {

View File

@ -18,6 +18,7 @@ public class SDK_SDKManagerWrap
L.RegFunction("CaptureShot", CaptureShot); L.RegFunction("CaptureShot", CaptureShot);
L.RegFunction("Logout", Logout); L.RegFunction("Logout", Logout);
L.RegFunction("CustomEvent", CustomEvent); L.RegFunction("CustomEvent", CustomEvent);
L.RegFunction("NewRoleTutorial", NewRoleTutorial);
L.RegFunction("InitCallback", InitCallback); L.RegFunction("InitCallback", InitCallback);
L.RegFunction("RegisterCallback", RegisterCallback); L.RegFunction("RegisterCallback", RegisterCallback);
L.RegFunction("LoginCallback", LoginCallback); L.RegFunction("LoginCallback", LoginCallback);
@ -225,6 +226,29 @@ public class SDK_SDKManagerWrap
} }
} }
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int NewRoleTutorial(IntPtr L)
{
try
{
ToLua.CheckArgsCount(L, 8);
SDK.SDKManager obj = (SDK.SDKManager)ToLua.CheckObject<SDK.SDKManager>(L, 1);
string arg0 = ToLua.CheckString(L, 2);
string arg1 = ToLua.CheckString(L, 3);
string arg2 = ToLua.CheckString(L, 4);
string arg3 = ToLua.CheckString(L, 5);
string arg4 = ToLua.CheckString(L, 6);
string arg5 = ToLua.CheckString(L, 7);
string arg6 = ToLua.CheckString(L, 8);
obj.NewRoleTutorial(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
return 0;
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int InitCallback(IntPtr L) static int InitCallback(IntPtr L)
{ {