Browse Source

douyousdk进化版

hexiaojie 11 months ago
parent
commit
a53f928b17

+ 1 - 0
GameClient/.idea/.idea.GameClient/.idea/vcs.xml

@@ -2,5 +2,6 @@
 <project version="4">
 <project version="4">
   <component name="VcsDirectoryMappings">
   <component name="VcsDirectoryMappings">
     <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
     <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/Assets/Game/CSShare" vcs="Git" />
   </component>
   </component>
 </project>
 </project>

+ 17 - 9
GameClient/Assets/Game/HotUpdate/Platform/QDDouYouManager.cs

@@ -39,16 +39,16 @@ namespace GFGGame
         {
         {
             var zoneScene = GameGlobal.zoneScene;
             var zoneScene = GameGlobal.zoneScene;
             if (zoneScene == null) return;
             if (zoneScene == null) return;
-            
+
             if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
             if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
                 zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
                 zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
-            
+
             var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
             var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
             if (roleInfo == null) return;
             if (roleInfo == null) return;
-            
+
             if (GameGlobal.myNumericComponent == null) return;
             if (GameGlobal.myNumericComponent == null) return;
             int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
             int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
- 
+
             if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
             if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
             if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
             if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
 
 
@@ -93,16 +93,16 @@ namespace GFGGame
 
 
             var zoneScene = GameGlobal.zoneScene;
             var zoneScene = GameGlobal.zoneScene;
             if (zoneScene == null) return;
             if (zoneScene == null) return;
-            
+
             if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
             if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
                 zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
                 zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
-            
+
             var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
             var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
             if (roleInfo == null) return;
             if (roleInfo == null) return;
-            
+
             if (GameGlobal.myNumericComponent == null) return;
             if (GameGlobal.myNumericComponent == null) return;
             int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
             int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
- 
+
             if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
             if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
             if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
             if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
 
 
@@ -120,7 +120,7 @@ namespace GFGGame
             QDManager.PushRoleAction(DouYouRoleLogReportType.ExitGame);
             QDManager.PushRoleAction(DouYouRoleLogReportType.ExitGame);
             QDDouYouManagerInit.Instance.ExitApp();
             QDDouYouManagerInit.Instance.ExitApp();
         }
         }
-        
+
         /// <summary>
         /// <summary>
         /// 跳转信息
         /// 跳转信息
         /// </summary>
         /// </summary>
@@ -128,6 +128,14 @@ namespace GFGGame
         {
         {
             QDDouYouManagerInit.Instance.ExtJumpInfo();
             QDDouYouManagerInit.Instance.ExtJumpInfo();
         }
         }
+
+        /// <summary>
+        /// 分享
+        /// </summary>
+        public void Share(string title, string contents)
+        {
+            QDDouYouManagerInit.Instance.ExtShare(title, contents);
+        }
     }
     }
 
 
     /// <summary>
     /// <summary>

+ 26 - 22
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

@@ -180,30 +180,33 @@ namespace GFGGame
             {
             {
                 GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
                 GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
             }
             }
+
             ActivitySProxy.ReqGetNewPlayerBonusStatus().Coroutine();
             ActivitySProxy.ReqGetNewPlayerBonusStatus().Coroutine();
             MainStorySProxy.GetStoryBonusDate().Coroutine();
             MainStorySProxy.GetStoryBonusDate().Coroutine();
-
         }
         }
 
 
         private async void SkipAllChapter()
         private async void SkipAllChapter()
         {
         {
-            List<StoryChapterCfg> chapterList = StoryChapterCfgArray.Instance.GetCfgsBysubType(1);   
+            List<StoryChapterCfg> chapterList = StoryChapterCfgArray.Instance.GetCfgsBysubType(1);
             foreach (var item in chapterList)
             foreach (var item in chapterList)
             {
             {
-                List<StoryLevelCfg> levelList = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(1,1,item.id);
+                List<StoryLevelCfg> levelList =
+                    StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(1, 1, item.id);
                 foreach (var level in levelList)
                 foreach (var level in levelList)
                 {
                 {
                     M2C_FinishInstanceZonesFightLevel response = null;
                     M2C_FinishInstanceZonesFightLevel response = null;
-                    response = (M2C_FinishInstanceZonesFightLevel)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightLevel()
-                    {
-                        LevelCfgId = level.id,
-                        Score = 99999,
-                        NpcScore = 0,
-                        UseRecommend = false
-                    });
+                    response = (M2C_FinishInstanceZonesFightLevel)await MessageHelper.SendToServer(
+                        new C2M_FinishInstanceZonesFightLevel()
+                        {
+                            LevelCfgId = level.id,
+                            Score = 99999,
+                            NpcScore = 0,
+                            UseRecommend = false
+                        });
                 }
                 }
             }
             }
         }
         }
+
         private async void OnClickBtnSkipCheckOpen()
         private async void OnClickBtnSkipCheckOpen()
         {
         {
             int isSkip = GameGlobal.skipCheckOpen == false ? 1 : 0;
             int isSkip = GameGlobal.skipCheckOpen == false ? 1 : 0;
@@ -432,18 +435,19 @@ namespace GFGGame
 
 
         private void OnClickShareTest2(EventContext context = null)
         private void OnClickShareTest2(EventContext context = null)
         {
         {
-            ShareContent content = new ShareContent();
-            content.SetText("this is a test string.");
-            content.SetImageUrl("https://f1.webshare.mob.com/code/demo/img/1.jpg");
-            content.SetTitle("test title");
-            content.SetTitleUrl("http://www.mob.com");
-            content.SetSite("Mob-ShareSDK");
-            content.SetSiteUrl("http://www.mob.com");
-            content.SetUrl("http://www.mob.com");
-            content.SetComment("test description");
-            //content.SetMusicUrl("http://mp3.mwap8.com/destdir/Music/2009/20090601/ZuiXuanMinZuFeng20090601119.mp3");
-            content.SetShareType(ContentType.Image);
-            QDShareManager.Instance.ShowShareContentEditor(PlatformType.WeChat, content);
+            // ShareContent content = new ShareContent();
+            // content.SetText("this is a test string.");
+            // content.SetImageUrl("https://f1.webshare.mob.com/code/demo/img/1.jpg");
+            // content.SetTitle("test title");
+            // content.SetTitleUrl("http://www.mob.com");
+            // content.SetSite("Mob-ShareSDK");
+            // content.SetSiteUrl("http://www.mob.com");
+            // content.SetUrl("http://www.mob.com");
+            // content.SetComment("test description");
+            // //content.SetMusicUrl("http://mp3.mwap8.com/destdir/Music/2009/20090601/ZuiXuanMinZuFeng20090601119.mp3");
+            // content.SetShareType(ContentType.Image);
+            // QDShareManager.Instance.ShowShareContentEditor(PlatformType.WeChat, content);
+            QDDouYouManager.Instance.Share("分享标题测试", "分享内容测试");
         }
         }
 
 
         private void OnClickShareTest3(EventContext context = null)
         private void OnClickShareTest3(EventContext context = null)

+ 10 - 0
GameClient/Assets/Game/Launcher/Platform/QDDouYouManagerInit.cs

@@ -101,6 +101,16 @@ namespace GFGGame.Launcher
         }
         }
 
 
         /// <summary>
         /// <summary>
+        /// 分享
+        /// </summary>
+        /// <param name="title"></param>
+        /// <param name="contents"></param>
+        public void ExtShare(string title, string contents)
+        {
+            Instance.CallDouYouMainActivity("extShare", title, contents);
+        }
+
+        /// <summary>
         /// 调起支付
         /// 调起支付
         /// </summary>
         /// </summary>
         /// <param name="orderId">订单号</param>
         /// <param name="orderId">订单号</param>

BIN
GameClient/Assets/Plugins/Android/libs/takuSDK-release.aar


+ 32 - 0
GameClient/Assets/Plugins/Android/libs/takuSDK-release.aar.meta

@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 9a317c756cd72a04a9ecc1382320fadb
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      Android: Android
+    second:
+      enabled: 1
+      settings: {}
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 0
+      settings:
+        DefaultValueInitialized: true
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
GameClient/Assets/Plugins/com/easy/bridge/DouYouMainActivity.java

@@ -162,6 +162,14 @@ public class DouYouMainActivity extends UnityPlayerActivity
       DouYou.getInstance().jumpInfo(DouYouMainActivity.this);
       DouYou.getInstance().jumpInfo(DouYouMainActivity.this);
     }
     }
 
 
+    //分享
+    public void extShare(String title, String contents){
+        ShareBean shareBean = new ShareBean();
+        shareBean.setTitle(title); // 分享标题,可为空
+        shareBean.setContents(contents); // 分享内容,可为空
+        DouYou.getInstance().share(MainActivity.this, shareBean);
+    }
+
     @Override
     @Override
     protected void onStart() {
     protected void onStart() {
         super.onStart();
         super.onStart();

+ 1 - 0
GameClient/GameClient.sln.DotSettings.user

@@ -1,2 +1,3 @@
 <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
 <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AApplication_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F683a2b31bf9142429c44f02c75dbc6c913ce00_003F1a_003F758e61d5_003FApplication_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String></wpf:ResourceDictionary>
 	<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String></wpf:ResourceDictionary>