浏览代码

添加boss

DESKTOP-FB72PO8\Administrator 3 周之前
父节点
当前提交
bb9acb19c5

+ 3 - 3
Assets/Res/Config/GroupConfig.json

@@ -4,21 +4,21 @@
       "ID": 100001,
       "GroupMonsterLevel": -1,
       "GroupMonster": [
-        9201
+        9101
       ]
     },
     {
       "ID": 100002,
       "GroupMonsterLevel": -1,
       "GroupMonster": [
-        9201
+        9102
       ]
     },
     {
       "ID": 100003,
       "GroupMonsterLevel": -1,
       "GroupMonster": [
-        9201
+        9103
       ]
     }
   ]

文件差异内容过多而无法显示
+ 66 - 2388
Assets/Res/Config/SkillConfig.json


+ 1 - 0
Assets/Scripts/GameLogic/Combat/CombatState/CombatFightState.cs

@@ -16,6 +16,7 @@ namespace GameLogic.Combat.CombatState
             CombatController.CombatCameraControllder.SetPos(playerHeroEntity.combatHeroGameObject.transform);
             CombatController.CombatCameraControllder.isStop = true;
             CombatController.IsFightState = true;
+            CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(50);
         }
 
         protected override void ProExit()

+ 6 - 0
Assets/Scripts/GameLogic/Combat/CombatState/CombatIdleState.cs

@@ -22,6 +22,12 @@ namespace GameLogic.Combat.CombatState
 
                 CombatController.MagicWeaponCombatSence.CloseSecene();
             }
+            CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(50);
+        }
+
+        protected override void ProUpdate(float t)
+        {
+            CombatController.CombatCameraControllder.Update(t);
         }
     }
 }

+ 2 - 0
Assets/Scripts/GameLogic/Combat/CombatState/CombatUpdateState.cs

@@ -19,6 +19,7 @@ namespace GameLogic.Combat.CombatState
         /// </summary>
         protected bool isNullMonster;
 
+      
         public CombatUpdateState(CombatController combatController) : base(combatController)
         {
         }
@@ -41,6 +42,7 @@ namespace GameLogic.Combat.CombatState
             _nextMonsterTime = Random.Range(5, 10);
             isNullMonster = true;
             CombatController.MagicWeaponCombatSence.CloseSecene();
+            CombatController.currActiveCombat.CombatCameraControllder.SetFieldOfView(80);
         }
 
         protected override void ProUpdate(float t)

+ 22 - 9
Assets/Scripts/GameLogic/Combat/CombatTool/CombatCameraControllder.cs

@@ -32,6 +32,10 @@ namespace GameLogic.Combat.CombatTool
         private float _cameraSelectValue;
         private float targetValue;
         private float _currTime;
+        private bool isUpdateFieldOfView;
+        private float FieldOfViewTime;
+        private float FieldOfViewTargetValue;
+        private float FieldOfViewStartValue;
 
         public void Init(CombatController combatController, Camera camera)
         {
@@ -94,17 +98,26 @@ namespace GameLogic.Combat.CombatTool
             isStartShake = false;
         }
 
+        public void SetFieldOfView(float fieldOfView)
+        {
+            FieldOfViewTime = 0;
+            FieldOfViewStartValue = Camera.fieldOfView;
+            FieldOfViewTargetValue = fieldOfView;
+            isUpdateFieldOfView = true;
+        }
+
         public void Update(float t)
         {
-            // if (isUpdateCameraToPath)
-            // {
-            //     _currTime += t;
-            //     CameraSelect_onValueChanged(Mathf.Lerp(currValue, targetValue, _currTime));
-            //     if (_currTime > 1)
-            //     {
-            //         isUpdateCameraToPath = false;
-            //     }
-            // }
+
+            if (isUpdateFieldOfView)
+            {
+                FieldOfViewTime += t;
+                Camera.fieldOfView = Mathf.Lerp(FieldOfViewStartValue, FieldOfViewTargetValue, FieldOfViewTime);
+                if (FieldOfViewTime >= 1)
+                {
+                    isUpdateFieldOfView = false;
+                }
+            }
 
             if (!isStartShake && !isStop)
             {

+ 19 - 18
Assets/Scripts/GameLogic/Combat/CombatTool/SceneTool/CombatSenceController.cs

@@ -74,10 +74,10 @@ namespace GameLogic.Combat.CombatTool
             }
             Vector3 p = besselPath.GetValue(0.99f);
             lasetDir = (target - p).normalized;
-            // GameObject gameObject = new GameObject("path");
-            // gameObject.transform.position = satrtPos;
-            // CombatPathMono combatPathMono = gameObject.AddComponent<CombatPathMono>();
-            // combatPathMono.BesselPath = besselPath;
+            GameObject gameObject = new GameObject("path");
+            gameObject.transform.position = satrtPos;
+            CombatPathMono combatPathMono = gameObject.AddComponent<CombatPathMono>();
+            combatPathMono.BesselPath = besselPath;
             InitZhuangSHi(besselPath);
             return besselPath;
         }
@@ -88,6 +88,7 @@ namespace GameLogic.Combat.CombatTool
             Vector3 dir = Quaternion.LookRotation(lasetDir) * new Vector3(offx, 0, 1);
             Vector3 target = satrtPos + dir.normalized * maxD;
             Vector3 dir2 = Quaternion.LookRotation(lasetDir) * new Vector3(offx * -1, 0, 1);
+            dir2 = dir2.normalized;
             Vector3 centre = satrtPos + dir2.normalized * maxD;
             // if (offx == 0)
             {
@@ -95,10 +96,10 @@ namespace GameLogic.Combat.CombatTool
             }
             Vector3 p = besselPath.GetValue(0.99f);
             lasetDir = (target - p).normalized;
-            // GameObject gameObject = new GameObject("path");
-            // gameObject.transform.position = satrtPos;
-            // CombatPathMono combatPathMono = gameObject.AddComponent<CombatPathMono>();
-            // combatPathMono.BesselPath = besselPath;
+            GameObject gameObject = new GameObject("path");
+            gameObject.transform.position = satrtPos;
+            CombatPathMono combatPathMono = gameObject.AddComponent<CombatPathMono>();
+            combatPathMono.BesselPath = besselPath;
             InitZhuangSHi(besselPath);
             return besselPath;
         }
@@ -246,12 +247,12 @@ namespace GameLogic.Combat.CombatTool
             {
                 if (NextBesselPath == null)
                 {
-                    // int odds = Random.Range(0, 100);
-                    // if (odds < 50)
-                    // {
-                    //     NextBesselPath = InitBesselPath(currBesselPath.b, Random.Range(0, 100) < 50 ? -1 : 1);
-                    // }
-                    // else
+                    int odds = Random.Range(0, 100);
+                    if (odds < 50)
+                    {
+                        NextBesselPath = InitBesselPath(currBesselPath.b, Random.Range(0, 100) < 50 ? -1 : 1);
+                    }
+                    else
                     {
                         NextBesselPath = InitBesselPath(currBesselPath.b);
                     }
@@ -260,10 +261,10 @@ namespace GameLogic.Combat.CombatTool
 
             if (currTime > 1)
             {
-                // if (NextBesselPath == null)
-                // {
-                //     NextBesselPath = InitBesselPath(currBesselPath.b, Random.Range(0, 100) < 50 ? -1 : 1);
-                // }
+                if (NextBesselPath == null)
+                {
+                    NextBesselPath = InitBesselPath(currBesselPath.b, Random.Range(0, 100) < 50 ? -1 : 1);
+                }
 
                 currTime = currTime % 1;
                 // targetPos = NextBesselPath.GetValue(currTime);

+ 1 - 1
Assets/Scripts/GameLogic/Combat/CombatTool/SceneTool/CombatSencePath.cs

@@ -12,7 +12,7 @@ namespace GameLogic.Combat.CombatTool
     {
         public Vector3 a;
         public Vector3 b;
-        private Vector3 Centre;
+        public Vector3 Centre;
         public bool isCentre;
 
         public float reclaimTime;

+ 2 - 1
Assets/Scripts/GameLogic/Combat/CombatType/LevelBattleCombatType.cs

@@ -137,7 +137,7 @@ namespace GameLogic.Combat.CombatType
 
 
                 CombatHeroEntity heroEntity = new CombatHeroEntity();
-                CombatController.currActiveCombat.CombatHeroController.playerHeroEntity = heroEntity;
+         
                 heroEntity.IsEnemy = false;
                 heroEntity.number = 0;
 
@@ -148,6 +148,7 @@ namespace GameLogic.Combat.CombatType
                         entity.CurrCombatHeroInfo.hp = (EncryptionLong)(20000);
                         entity.MaxCombatHeroInfo.hp = (EncryptionLong)(20000);
                         combatController.CombatHeroController.AddHero(entity);
+                        CombatController.currActiveCombat.CombatHeroController.playerHeroEntity = heroEntity;
                     }, isPlayer: true));
             }
         }

+ 1 - 1
Assets/Scripts/GameUI/UI/MainPanel/MainPanel.cs

@@ -90,7 +90,7 @@ namespace Fort23.Mono
         {
             await base.Show();
             SkillSelectPanel.OpenSkillSelectPanel();
-            CameraSelect.value = 0.7f;
+            CameraSelect.value = 0.2f;
         }
 
         private void CameraSelect_onValueChanged(float value)

部分文件因为文件数量过多而无法显示