|
@@ -1,17 +1,17 @@
|
|
|
-using ET;
|
|
|
+using ET;
|
|
|
+using GFGGame.Launcher;
|
|
|
using UnityEngine;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
|
-
|
|
|
public class QDManager
|
|
|
{
|
|
|
public bool isLogining;
|
|
|
public string uid;
|
|
|
-
|
|
|
+
|
|
|
public static void Init()
|
|
|
{
|
|
|
- switch(LauncherConfig.ChannelId)
|
|
|
+ switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
default:
|
|
|
QDDouYouManager.Instance.Init();
|
|
@@ -25,7 +25,7 @@ namespace GFGGame
|
|
|
switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
case (int)ChannelID.TapTap:
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
case (int)ChannelID.Test:
|
|
|
bool login = GameController.CheckLoginCache(true);
|
|
@@ -34,6 +34,7 @@ namespace GFGGame
|
|
|
ViewManager.Hide<ModalStatusView>();
|
|
|
ViewManager.Show<LoginInputView>();
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
case (int)ChannelID.DouYouTest:
|
|
|
QDDouYouManager.Instance.Login();
|
|
@@ -49,7 +50,7 @@ namespace GFGGame
|
|
|
switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
case (int)ChannelID.TapTap:
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
case (int)ChannelID.Test:
|
|
|
|
|
@@ -68,7 +69,7 @@ namespace GFGGame
|
|
|
switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
case (int)ChannelID.TapTap:
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
case (int)ChannelID.Test:
|
|
|
|
|
@@ -88,7 +89,7 @@ namespace GFGGame
|
|
|
switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
case (int)ChannelID.TapTap:
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
case (int)ChannelID.Test:
|
|
|
|
|
@@ -107,7 +108,7 @@ namespace GFGGame
|
|
|
switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
case (int)ChannelID.TapTap:
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
case (int)ChannelID.Test:
|
|
|
|
|
@@ -130,13 +131,15 @@ namespace GFGGame
|
|
|
{
|
|
|
PlayerPrefs.DeleteKey(GameConst.PASSWORD_LAST_LOGIN_KEY);
|
|
|
}
|
|
|
+
|
|
|
switch (LauncherConfig.ChannelId)
|
|
|
{
|
|
|
default:
|
|
|
- if(!fromSdkLogoutCallback)
|
|
|
+ if (!fromSdkLogoutCallback)
|
|
|
{
|
|
|
QDDouYouManager.Instance.Logout();
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -157,13 +160,34 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static bool IsTaptap
|
|
|
+ //上报角色行为给sdk
|
|
|
+ public static void PushRoleAction(DouYouRoleLogReportType reportType)
|
|
|
{
|
|
|
- get
|
|
|
- {
|
|
|
- return LauncherConfig.ChannelId == (int)ChannelID.TapTap;
|
|
|
- }
|
|
|
+ //改名上报给sdk
|
|
|
+ var zoneScene = GameGlobal.zoneScene;
|
|
|
+ if (zoneScene == null) return;
|
|
|
+
|
|
|
+ if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
|
|
|
+ zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
|
|
|
+
|
|
|
+ var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
|
|
|
+ if (roleInfo == null) return;
|
|
|
+
|
|
|
+ if (GameGlobal.myNumericComponent == null) return;
|
|
|
+ int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
|
|
|
+
|
|
|
+ if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
|
|
|
+ if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
|
|
|
+
|
|
|
+ string serverName = zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo.ServerName;
|
|
|
+ QDDouYouManagerInit.Instance.ReportRole((int)reportType,
|
|
|
+ roleInfo.Id.ToString(), lvl.ToString(), roleInfo.Name, roleInfo.ServerId.ToString(),
|
|
|
+ serverName);
|
|
|
}
|
|
|
|
|
|
+ public static bool IsTaptap
|
|
|
+ {
|
|
|
+ get { return LauncherConfig.ChannelId == (int)ChannelID.TapTap; }
|
|
|
+ }
|
|
|
}
|
|
|
}
|