Browse Source

漂浮英灵参数问题解决

SZAND\msx_2 1 year ago
parent
commit
816b947a5b

+ 7 - 0
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab

@@ -1029,6 +1029,13 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
+  maxTime: 1.5
+  minTime: 0.1
+  maxHeight: 9
+  minHeight: 4
+  maxRotateSpeed: 20
+  minRotateSpeed: 5
+  floatTime: 20
   id: 0
   jumpSpeed: 10
   searchState: 0

+ 10 - 1
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Giant.prefab

@@ -466,6 +466,9 @@ MonoBehaviour:
   searchTrigger: {fileID: 2932762729738363159}
   targetTypes: 010000000200000003000000
   canHitFly: 0
+  linked: 0
+  joint: {fileID: 0}
+  rope: {fileID: 0}
   foot: {fileID: 5440846222604650418}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
@@ -479,6 +482,13 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
+  maxTime: 1.5
+  minTime: 0.1
+  maxHeight: 9
+  minHeight: 4
+  maxRotateSpeed: 20
+  minRotateSpeed: 5
+  floatTime: 20
   id: 0
   jumpSpeed: 10
   searchState: 0
@@ -491,7 +501,6 @@ MonoBehaviour:
   soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
   soulStartSpeed: 50
   dropSoulAngle: 1
-  joint: {fileID: 0}
 --- !u!54 &5440846222648032765
 Rigidbody:
   m_ObjectHideFlags: 0

+ 10 - 1
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Sword.prefab

@@ -261,6 +261,9 @@ MonoBehaviour:
   searchTrigger: {fileID: 428784489592146076}
   targetTypes: 010000000300000002000000
   canHitFly: 0
+  linked: 0
+  joint: {fileID: 0}
+  rope: {fileID: 0}
   foot: {fileID: 2437299196663985756}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
@@ -274,6 +277,13 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
+  maxTime: 1.5
+  minTime: 0.1
+  maxHeight: 9
+  minHeight: 4
+  maxRotateSpeed: 20
+  minRotateSpeed: 5
+  floatTime: 20
   id: 0
   jumpSpeed: 9
   searchState: 0
@@ -286,7 +296,6 @@ MonoBehaviour:
   soulPrefab: {fileID: 1723151111827507807, guid: e2b65aa482f2f1447a4074208d72b778, type: 3}
   soulStartSpeed: 30
   dropSoulAngle: 0
-  joint: {fileID: 0}
 --- !u!54 &2437299196472462355
 Rigidbody:
   m_ObjectHideFlags: 0

+ 8 - 6
ActionTowerDefense/Assets/Resources/Prefab/Player.prefab

@@ -709,6 +709,7 @@ MonoBehaviour:
   enemyRopePrefab: {fileID: 616841038056457886, guid: db20d049c85578a4db3cef14a52b0f7b, type: 3}
   playerRopePrefab: {fileID: 7712882736463803884, guid: 2f24cd9614ae27e4e9525c04d7c7244f, type: 3}
   linkedEnemy: []
+  playerID: 0
 --- !u!1 &3571941038519084344
 GameObject:
   m_ObjectHideFlags: 0
@@ -830,12 +831,12 @@ MonoBehaviour:
   minHurtKeepTime: 0.2
   hurtKeepTime: 0
   hurtChangeVelocity: 1
-  maxTime: 15
-  minTime: 6
-  maxHeight: 10
-  minHeight: 6
-  maxRotateSpeed: 10
-  minRotateSpeed: 4
+  maxTime: 1.5
+  minTime: 0.1
+  maxHeight: 9
+  minHeight: 4
+  maxRotateSpeed: 20
+  minRotateSpeed: 5
   floatTime: 20
   demonicPrefabs:
   - {fileID: 8639832132491289359, guid: 4c2987691cdb47040b3a55ff928803c3, type: 3}
@@ -957,6 +958,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 01b7616677d36984185e7836d04c5b0b, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  FloatEffect: {fileID: 0}
   currentSpirit: 1
 --- !u!1 &3571941039716665622
 GameObject:

+ 9 - 2
ActionTowerDefense/Assets/Scripts/MoveCharacter.cs

@@ -23,7 +23,7 @@ public class MoveCharacter : Character
     public float hurtChangeVelocity = 1;
 
     [Header("新增漂浮效果参数")]
-    public float maxTime = 15; //上升最大耗时
+    public float maxTime = 0; //上升最大耗时
     public float minTime = 6;  //上升最小耗时
     public float maxHeight = 12;    //最大上升高度
     public float minHeight = 7;    //最小上升高度
@@ -48,16 +48,22 @@ public class MoveCharacter : Character
 
     private int floatState; //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
 
-
+    private void Awake()
+    {
+        print(maxTime);
+    }
 
     public void FloatStateOn()
     {
+        /*
         maxTime = 1.5f; 
         minTime = 0.1f;
         maxHeight = 9;
         minHeight = 4;
 
         floatTime = 20;
+        */
+        print(maxTime);
         ChangeState(CharacterState.Rise);
         floatState = 1;
         riseTime = Random.Range(minTime, maxTime);
@@ -77,6 +83,7 @@ public class MoveCharacter : Character
 
     private void Update()
     {
+        //print(maxTime);
         if (floatState == 1)
         {
             RotateSelf();

+ 4 - 4
ActionTowerDefense/Assets/Scripts/Spirits/Spirits.cs

@@ -7,8 +7,8 @@ public class Spirits : MonoBehaviour
     public enum SpiritType  //英灵种类
     {
         Float = 0,       //漂浮
-        Dash = 1,      //冲刺
-        Kebab = 2,      //烤串
+        Assassin = 1,      //冲刺
+        Cook = 2,      //烤串
         Invisible = 3,  //隐身
     }
 
@@ -24,11 +24,11 @@ public class Spirits : MonoBehaviour
             case SpiritType.Float:
                 //特效用预制体做
                 break;
-            case SpiritType.Dash:
+            case SpiritType.Assassin:
                 break;
             case SpiritType.Invisible:
                 break;
-            case SpiritType.Kebab:
+            case SpiritType.Cook:
                 break;
         }
     }