Selaa lähdekoodia

1014白鹭小怪制作

GrainFull 3 kuukautta sitten
vanhempi
commit
fd28768371

+ 12 - 11
ActionTowerDefense/Assets/Resources/Prefab/Enemy/Enemy_1014.prefab

@@ -189,8 +189,8 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 2.0019312, y: 4.916024, z: 2}
-  m_Center: {x: 1.6623394, y: 1.2948952, z: 0}
+  m_Size: {x: 2.458385, y: 4.916024, z: 2}
+  m_Center: {x: 1.4341125, y: 1.2948952, z: 0}
 --- !u!114 &9020361017135710302
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -467,6 +467,7 @@ MeshRenderer:
   m_RendererPriority: 0
   m_Materials:
   - {fileID: 2100000, guid: 5593775b4c6e75f4890fefc0df07f5b9, type: 2}
+  - {fileID: 2100000, guid: cd83f82aa01ea144fae3d29d40a9504c, type: 2}
   m_StaticBatchInfo:
     firstSubMesh: 0
     subMeshCount: 0
@@ -608,7 +609,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 2616922587087395095}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0, y: -0.96, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -626,7 +627,7 @@ BoxCollider:
   m_IsTrigger: 0
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 2.8619666, y: 3.1534104, z: 2}
+  m_Size: {x: 1.96, y: 3.1534104, z: 2}
   m_Center: {x: 1.447715, y: 2.5587232, z: 0}
 --- !u!1 &2623922659733331491
 GameObject:
@@ -763,7 +764,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5307676761346103599}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: -0.05, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -803,7 +804,7 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 2.1766057, y: 29.720766, z: 20}
+  m_Size: {x: 2.33, y: 29.720766, z: 20}
   m_Center: {x: 0.39999998, y: -12.158563, z: 0}
 --- !u!1 &5388987656270167698
 GameObject:
@@ -1099,7 +1100,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8639832132450015563}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 1, y: 0.61, z: 0}
+  m_LocalPosition: {x: 0.81, y: 0.91, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -1117,7 +1118,7 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 0.5, y: 0.5, z: 2}
+  m_Size: {x: 2.91, y: 0.5, z: 2}
   m_Center: {x: 0.64777595, y: -1.0383594, z: 0}
 --- !u!114 &8639832132450015562
 MonoBehaviour:
@@ -1237,7 +1238,7 @@ MonoBehaviour:
   attributeStatus: {fileID: 0}
   hitFeedbackSystem: {fileID: 0}
   extraRiseGravity: -28.8
-  extraFallGravity: -14.4
+  extraFallGravity: 0
   extraGroundGravity: -28.8
   velocityAddition: 0
   platformPosY: 0
@@ -1319,7 +1320,7 @@ Rigidbody:
   m_IsKinematic: 0
   m_Interpolate: 0
   m_Constraints: 120
-  m_CollisionDetection: 0
+  m_CollisionDetection: 1
 --- !u!114 &3979041853861796194
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1556,7 +1557,7 @@ MonoBehaviour:
   maxRiseHeight: 16
   upHeight: 3
   dashSpeed: 70
-  riseSpeed: 22
+  riseSpeed: 30
   breakDuration: 3.333
   dashDirection: {x: 0, y: -1, z: 0}
   riseDirection: {x: 0, y: 1, z: 0}

+ 2 - 2
ActionTowerDefense/Assets/Resources/Prefab/FX/Water_Ring_fall.prefab

@@ -26,7 +26,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 571579974112634895}
   m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
-  m_LocalPosition: {x: 0.44, y: -0, z: 2.55}
+  m_LocalPosition: {x: 0.44, y: 0.000000052154064, z: 1.7200005}
   m_LocalScale: {x: 1, y: 3, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -43976,7 +43976,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8709081779067548719}
   m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
-  m_LocalPosition: {x: -0.52, y: -0, z: 2.48}
+  m_LocalPosition: {x: -0.52, y: 0, z: 1.72}
   m_LocalScale: {x: -1, y: 3, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []

+ 24 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Egret/Enemy_Egret_SkeletonData_Controller.controller

@@ -140,6 +140,28 @@ AnimationClip:
   m_HasGenericRootTransform: 0
   m_HasMotionFloatCurves: 0
   m_Events: []
+--- !u!1101 &-7019516492305273384
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions: []
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 6838506532899232691}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.89285713
+  m_HasExitTime: 1
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
 --- !u!1102 &-6863918266226191467
 AnimatorState:
   serializedVersion: 6
@@ -1788,7 +1810,8 @@ AnimatorState:
   m_Name: attack_fall
   m_Speed: 1
   m_CycleOffset: 0
-  m_Transitions: []
+  m_Transitions:
+  - {fileID: -7019516492305273384}
   m_StateMachineBehaviours: []
   m_Position: {x: 50, y: 50, z: 0}
   m_IKOnFeet: 0

+ 13 - 0
ActionTowerDefense/Assets/Scripts/Characters/Enemy.cs

@@ -447,6 +447,19 @@ public class Enemy : MoveCharacter
                 if (isAdjustHeight == 1)
                 {
                     AdjustHeight();
+                    if (!foot.haveGravity)
+                    {
+                        targetQt = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y, platformRotZ);
+                    }
+                    if (RotLerpTime < 1)
+                    {
+                        RotLerpTime += RotLerpSpeed * Time.deltaTime;
+                        transform.rotation = Quaternion.Lerp(transform.rotation, targetQt, RotLerpTime);
+                    }
+                    else
+                    {
+                        transform.rotation = targetQt;
+                    }
                 }
                 else if (isAdjustHeight == 2)
                 {

+ 7 - 3
ActionTowerDefense/Assets/Scripts/Skills/chargeDownward.cs

@@ -71,6 +71,7 @@ public class chargeDownward : MonoBehaviour
             StopAllMovements();
             if (owner.state == CharacterState.Rise)
             {
+                rb.useGravity = false;
                 foot.GetComponent<Foot>().trigGroundList.Clear();
                 foot.SetActive(false);
             }
@@ -80,6 +81,10 @@ public class chargeDownward : MonoBehaviour
             }
             return;
         }
+        else
+        {
+            rb.useGravity = false;
+        }
 
         switch (currentState)
         {
@@ -188,9 +193,9 @@ public class chargeDownward : MonoBehaviour
     {
         if (!IsRising) return;
 
-        float heightDifference = Mathf.Abs(transform.position.y - targetRiseHeight);
+        float heightDifference = transform.position.y - targetRiseHeight;
 
-        if (heightDifference < 1f)
+        if (heightDifference > 0.1f)
         {
             IsRising = false;
             canDash = true;
@@ -222,7 +227,6 @@ public class chargeDownward : MonoBehaviour
     public void StopAllMovements()
     {
         IsDashing = false;
-        IsRising = false;
         isBreaking = false;
         currentState = MovementState.Idle;
     }