Kaynağa Gözat

Merge branch 'master' of http://bttc123.synology.me:3002/bttc123/ActionTowerDefense

DESKTOP-PG06IH1\Mr.AB 6 ay önce
ebeveyn
işleme
9871b571d3

+ 29 - 13
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Demonic_Arrow.prefab

@@ -198,6 +198,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   imgHp: {fileID: 3266580543050502037}
+  pc: {fileID: 0}
+  points: []
 --- !u!1 &2234394376273647362
 GameObject:
   m_ObjectHideFlags: 0
@@ -602,6 +604,10 @@ MonoBehaviour:
     attackEffect: 
     floatState:
       time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
     blowUp:
       dir: {x: 0, y: 0, z: 0}
       force: 0
@@ -1120,9 +1126,10 @@ MonoBehaviour:
   attributeStatus: {fileID: 0}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
-  canMove: 1
   moveSpeed: 5
   flyHeight: 0
+  maxFlyHeight: 7
+  minFlyHeight: 5
   flyUpSpeed: 10
   totalBeRepelValue: 100
   beRepelValue: 0
@@ -1137,16 +1144,7 @@ MonoBehaviour:
   decelerationRatio: 1
   comaTime: 5
   pastComaTime: 0
-  floatState: 0
-  maxTime: 1.5
-  minTime: 0.1
-  maxHeight: 12
-  minHeight: 7
   floatTime: 10
-  maxRotateSpeed: 20
-  minRotateSpeed: 5
-  isFloat: 0
-  normalFallSpeed: 10
   effect: {fileID: 0}
   soulPrefab: {fileID: 0}
   soulStartSpeed: 1
@@ -1262,6 +1260,10 @@ MonoBehaviour:
     attackEffect: 
     floatState:
       time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
     blowUp:
       dir: {x: 0, y: 0, z: 0}
       force: 0
@@ -1304,6 +1306,10 @@ MonoBehaviour:
       attackEffect: 
       floatState:
         time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
       blowUp:
         dir: {x: 0, y: 0, z: 0}
         force: 0
@@ -1343,6 +1349,10 @@ MonoBehaviour:
       attackEffect: 
       floatState:
         time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
       blowUp:
         dir: {x: 0, y: 0, z: 0}
         force: 0
@@ -1381,6 +1391,10 @@ MonoBehaviour:
       attackEffect: 
       floatState:
         time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
       blowUp:
         dir: {x: 0, y: 0, z: 0}
         force: 0
@@ -1420,10 +1434,12 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   curSpecialStates: ffffffff
-  strikeStunTime: 0
-  decelerationRatioX: 2
-  decelerationRatioY: 15
+  attributeTime: 0
   resistances:
+    Float: 0
     BlowUp: 0
     ShotDown: 0
     Stun: 0
+  decelerationRatioX: 2
+  decelerationRatioY: 15
+  floatingState: 0

+ 4 - 0
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -637,6 +637,10 @@ public class Demonic : MoveCharacter
 
     public void Attack_summon()
     {
+        if (canFly)
+        {
+            flyHeight = Random.Range(minFlyHeight, maxFlyHeight);
+        }
         attackController.Attack_summon();
         Vector3 moveDir;
         if (PlayersInput.instance[playerID].bodyTrans.localScale.x > 0)

+ 3 - 0
ActionTowerDefense/Assets/Scripts/Characters/MoveCharacter.cs

@@ -26,7 +26,10 @@ public class MoveCharacter : Character
 
     [Header("ÊôÐÔ")]
     public float moveSpeed = 5;
+    [DisplayOnly]
     public float flyHeight;
+    public float maxFlyHeight;
+    public float minFlyHeight;
     public float flyUpSpeed = 10;
 
     [Header("ÐéÈõ״̬")]

+ 2 - 2
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -96,7 +96,7 @@ public class PlayerController : MoveCharacter
 
     [Header("·ÉÐÐÊôÐÔ")]
     public float flySpeed = 5;
-    public float maxFlyHeight;
+    public float playerMaxFlyHeight;
 
     [Header("ÕÙ»½ÊôÐÔ")]
     public float totalSummonTime;
@@ -1761,7 +1761,7 @@ public class PlayerController : MoveCharacter
         if (canFly)
         {
             velocity = leftDir.normalized * flySpeed;
-            if (transform.position.y > maxFlyHeight && velocity.y > 0)
+            if (transform.position.y > playerMaxFlyHeight && velocity.y > 0)
             {
                 velocity.y = 0;
             }