Browse Source

增加镜头动画资源收集;代码整理;增加三个战场玩家区域指定测试代码

大爷 1 year ago
parent
commit
c3b8f4f178

+ 12 - 0
Unity/Assets/AssetBundleCollectorSetting.asset

@@ -174,3 +174,15 @@ MonoBehaviour:
       PackRuleName: PackSeparately
       FilterRuleName: CollectAll
       AssetTags: 
+  - GroupName: Playable
+    GroupDesc: "\u955C\u5934\u52A8\u753B"
+    AssetTags: 
+    ActiveRuleName: EnableGroup
+    Collectors:
+    - CollectPath: Assets/UnityArts/Tiktok/timeline
+      CollectorGUID: bcb0d72ef4994f0448c48f5c62977f94
+      CollectorType: 0
+      AddressRuleName: AddressByGroupAndFileName
+      PackRuleName: PackDirectory
+      FilterRuleName: CollectAll
+      AssetTags: 

+ 2 - 2
Unity/Assets/Scripts/Codes/Hotfix/Client/Login/LoginHelper.cs

@@ -42,7 +42,7 @@ namespace ET.Client
                 }
                 if (r2CLogin.Error != ErrorCode.ERR_Success)
                 {
-                    Log.Debug($"登陆验证错误...errCode={r2CLogin.Error}");
+                    Log.Error($"登陆验证错误...errCode={r2CLogin.Error}");
                     return r2CLogin.Error;
                 }
 
@@ -54,7 +54,7 @@ namespace ET.Client
                 G2C_LoginGame g2CLoginGate = (G2C_LoginGame)await gateSession.Call(new C2G_LoginGame() { Token = roomToken ?? "" });
                 if (g2CLoginGate.Error != ErrorCode.ERR_Success)
                 {
-                    Log.Debug($"登陆game错误...errCode={g2CLoginGate.Error}");
+                    Log.Error($"登陆game错误...errCode={g2CLoginGate.Error}");
                     return g2CLoginGate.Error;
                 }
 

+ 33 - 14
Unity/Assets/Scripts/Codes/Hotfix/Client/battle/BattleMgr_Cmd.cs

@@ -20,24 +20,40 @@ namespace ET
             var session = PlayerComponent.Instance.ClientScene().GetComponent<SessionComponent>().Session;
             switch (a.FuncIndex)
             {
+                case (int)BattleFunc.FUNC.ClientIsReady:
+                    session.Call(new C2G_BattleNotify()
+                    {
+                        Message = BattleNotify.ClientIsReady.ToString()
+                    }).Coroutine();
+                    break;
                 case (int)BattleFunc.FUNC.Start:
                     session.Call(new C2G_BattleNotify()
                     {
                         Message = BattleNotify.StartRefreshMonster.ToString()
                     }).Coroutine();
                     break;
+                case (int)BattleFunc.FUNC.Start2:
+                    session.Call(new C2G_BattleNotify()
+                    {
+                        Message = BattleNotify.StartRefreshMonster2.ToString()
+                    }).Coroutine();
+                    break;
+                case (int)BattleFunc.FUNC.Start3:
+                    session.Call(new C2G_BattleNotify()
+                    {
+                        Message = BattleNotify.StartRefreshMonster3.ToString()
+                    }).Coroutine();
+                    break;
                 case (int)KeyCode.F1:
                     var units = new int[] { 101, 111, 121, 131 };
                     var centerpos = GetCurBattleCenter();
                     var rand = new Random();
                     foreach (var id in units)
                     {
-                        float r = (float)Math.Sqrt(rand.Next(2304)) + 12;
-                        double ang = rand.Next(40) / 180.0f * Math.PI + Math.PI/2.0f + Math.PI;
-                        //Log.Debug($"rand unit r({r}), ang({ang})");
+                        float r = (float)Math.Sqrt(rand.Next(2500)) + 10;
+                        double ang = rand.Next(22) / 180.0f * Math.PI + Math.PI*150f/180f;
                         float x = centerpos.X + (float)(r * Math.Cos(ang));
                         float y = centerpos.Y - (float)(r * Math.Sin(ang));
-                        //Log.Debug($"born unit: r:{r}, ang:{ang}---({x},{y})");
 
                         session.Call(new C2G_AddUnitsToMap()
                         {
@@ -55,8 +71,8 @@ namespace ET
                     for (int i = 0; i < 2; i++)
                     {
                         var id = units2[rand.Next(units2.Length)];
-                        float r = (float)Math.Sqrt(rand.Next(2304)) + 12;
-                        double ang = rand.Next(40) / 180.0f * Math.PI + Math.PI / 2.0f + Math.PI;
+                        float r = (float)Math.Sqrt(rand.Next(3136)) + 10;
+                        double ang = rand.Next(20) / 180.0f * Math.PI + Math.PI * 76f / 180f;
                         float x = centerpos.X + (float)(r * Math.Cos(ang));
                         float y = centerpos.Y - (float)(r * Math.Sin(ang));
 
@@ -76,8 +92,8 @@ namespace ET
                     for (int i = 0; i < 1; i++)
                     {
                         var id = units3[rand.Next(units3.Length)];
-                        float r = (float)Math.Sqrt(rand.Next(2304)) + 12;
-                        double ang = rand.Next(40) / 180.0f * Math.PI + Math.PI / 2.0f + Math.PI;
+                        float r = (float)Math.Sqrt(rand.Next(2500)) + 10;
+                        double ang = rand.Next(22) / 180.0f * Math.PI + Math.PI * 78f / 180f + Math.PI;
                         float x = centerpos.X + (float)(r * Math.Cos(ang));
                         float y = centerpos.Y - (float)(r * Math.Sin(ang));
 
@@ -128,19 +144,22 @@ namespace ET
                     }).Coroutine();
                     break;
                 case (int)KeyCode.F10:
-                    EventSystem.Instance.Publish<ShowOrHideHeadBar>();
-                    break;
-                case (int)KeyCode.F11:
-                    EventSystem.Instance.Publish<SoundMuteEvent>();
-                    break;
-                case (int)KeyCode.F12:
                     session.Call(new C2G_BattleNotify()
                     {
                         Message = BattleNotify.TiktokLike_energy.ToString()
                     }).Coroutine();
                     break;
+                case (int)KeyCode.F11:
+                    EventSystem.Instance.Publish(ShowVipName.Clone(8));
+                    break;
+                case (int)KeyCode.F12:
+                    EventSystem.Instance.Publish(TiktokGiftEvent.Clone(1, 13, "额滴个马", ""));
+                    break;
             }
             await ETTask.CompletedTask;
+
+            //EventSystem.Instance.Publish<ShowOrHideHeadBar>();
+            //EventSystem.Instance.Publish<SoundMuteEvent>();
         }
 
         //获得当前战场focus中心(当前塔位置)