浏览代码

弓箭手可以在空中移动,可以在空中被召唤。弓箭手的子弹改为追踪

wulifu 1 年之前
父节点
当前提交
2302702500

+ 8 - 7
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab

@@ -587,7 +587,7 @@ BoxCollider:
   m_Enabled: 1
   serializedVersion: 2
   m_Size: {x: 40, y: 3, z: 1}
-  m_Center: {x: 0, y: 1.5, z: 0}
+  m_Center: {x: 0, y: 0, z: 0}
 --- !u!1 &5388987656270167698
 GameObject:
   m_ObjectHideFlags: 0
@@ -997,20 +997,21 @@ MonoBehaviour:
   dieKeepTime: 0
   totalDieKeepTime: 2
   attackTarget: {fileID: 0}
-  shootTrack: 0
+  shootTrack: 1
   foot: {fileID: 8639832132450015562}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
-  maxMoveSpeed: 3
+  moveSpeed: 5
   hurtKeepTime: 0
   totalHurtKeepTime: 0.5
   id: 0
+  costMp: 10
   searchTrigger: {fileID: 3566347593191160092}
   searchState: 0
   targetTypes: 0400000005000000
   attackDistance: 10
-  canFly: 0
-  canHitFly: 0
+  canFly: 1
+  canHitFly: 1
   targetCharacter: {fileID: 0}
 --- !u!54 &8639832132491289349
 Rigidbody:
@@ -1023,8 +1024,8 @@ Rigidbody:
   m_Mass: 10
   m_Drag: 0
   m_AngularDrag: 0.05
-  m_UseGravity: 1
+  m_UseGravity: 0
   m_IsKinematic: 0
   m_Interpolate: 0
-  m_Constraints: 120
+  m_Constraints: 124
   m_CollisionDetection: 0

+ 4 - 3
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Giant.prefab

@@ -456,10 +456,11 @@ MonoBehaviour:
   foot: {fileID: 5440846222604650418}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
-  maxMoveSpeed: 1
+  moveSpeed: 5
   hurtKeepTime: 0
   totalHurtKeepTime: 0.5
   id: 0
+  costMp: 10
   searchTrigger: {fileID: 2932762729738363159}
   searchState: 0
   targetTypes: 0400000005000000
@@ -541,8 +542,8 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 40, y: 3, z: 1}
-  m_Center: {x: 0, y: 1.5, z: 0}
+  m_Size: {x: 40, y: 5, z: 1}
+  m_Center: {x: 0, y: 2.5, z: 0}
 --- !u!1 &6239053045979137450
 GameObject:
   m_ObjectHideFlags: 0

+ 6 - 6
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Arrow.prefab

@@ -587,7 +587,7 @@ BoxCollider:
   m_Enabled: 1
   serializedVersion: 2
   m_Size: {x: 40, y: 3, z: 1}
-  m_Center: {x: 0, y: 1.5, z: 0}
+  m_Center: {x: 0, y: 0, z: 0}
 --- !u!1 &5388987656270167698
 GameObject:
   m_ObjectHideFlags: 0
@@ -997,7 +997,7 @@ MonoBehaviour:
   dieKeepTime: 0
   totalDieKeepTime: 2
   attackTarget: {fileID: 0}
-  shootTrack: 0
+  shootTrack: 1
   foot: {fileID: 8639832132450015562}
   extraRiseGravity: -28.8
   extraFallGravity: -14.4
@@ -1010,8 +1010,8 @@ MonoBehaviour:
   searchState: 0
   targetTypes: 010000000300000002000000
   attackDistance: 10
-  canFly: 0
-  canHitFly: 0
+  canFly: 1
+  canHitFly: 1
   targetCharacter: {fileID: 0}
   attackRatio: 0
   maxMoveSpeed: 2.2
@@ -1027,8 +1027,8 @@ Rigidbody:
   m_Mass: 10
   m_Drag: 0
   m_AngularDrag: 0.05
-  m_UseGravity: 1
+  m_UseGravity: 0
   m_IsKinematic: 0
   m_Interpolate: 0
-  m_Constraints: 120
+  m_Constraints: 124
   m_CollisionDetection: 0

+ 2 - 2
ActionTowerDefense/Assets/Resources/Prefab/Enemy_Giant.prefab

@@ -545,8 +545,8 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 40, y: 3, z: 1}
-  m_Center: {x: 0, y: 1.5, z: 0}
+  m_Size: {x: 40, y: 5, z: 1}
+  m_Center: {x: 0, y: 2.5, z: 0}
 --- !u!1 &6239053045979137450
 GameObject:
   m_ObjectHideFlags: 0

+ 3 - 3
ActionTowerDefense/Assets/Resources/Prefab/Player.prefab

@@ -505,10 +505,10 @@ MonoBehaviour:
   totalAttack1Time: 1
   totalAttack2Time: 0.5
   isDie: 0
-  totalHp: 100
+  totalHp: 3000
   hp: 0
   attack1Infos:
-  - damage: 30
+  - damage: 300
     attackDir: {x: -1, y: 0, z: 0}
     force: 1000
   attack2Infos: []
@@ -532,7 +532,7 @@ MonoBehaviour:
   - {fileID: 5440846222648032759, guid: 05825e721b2832f478f66e78daed901f, type: 3}
   - {fileID: 2437299196472462361, guid: a429663f5ce3055459229a7eddc06c58, type: 3}
   demonicSummonPos:
-  - {x: -5, y: 0, z: 0}
+  - {x: -5, y: 3, z: 0}
   - {x: -5, y: 0, z: 0}
   - {x: -5, y: 0, z: 0}
   uiMp: {fileID: 8465211090008398057}

+ 0 - 12
ActionTowerDefense/Assets/Scenes/SampleScene.unity

@@ -1047,18 +1047,6 @@ PrefabInstance:
   m_Modification:
     m_TransformParent: {fileID: 0}
     m_Modifications:
-    - target: {fileID: 3571941038519084336, guid: 5b538f610930dd743a096c582e2810f4, type: 3}
-      propertyPath: totalHp
-      value: 3000
-      objectReference: {fileID: 0}
-    - target: {fileID: 3571941038519084336, guid: 5b538f610930dd743a096c582e2810f4, type: 3}
-      propertyPath: rushInvincibleTime
-      value: 0.2
-      objectReference: {fileID: 0}
-    - target: {fileID: 3571941038519084336, guid: 5b538f610930dd743a096c582e2810f4, type: 3}
-      propertyPath: attack1Infos.Array.data[0].damage
-      value: 300
-      objectReference: {fileID: 0}
     - target: {fileID: 3571941038519084344, guid: 5b538f610930dd743a096c582e2810f4, type: 3}
       propertyPath: m_Name
       value: Player

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

@@ -198,7 +198,7 @@ public class Demonic : MoveCharacter
                     Attack2();
                     break;
                 }
-                if (!foot.TrigGround)
+                if (!foot.TrigGround && !canFly)
                 {
                     if (rb.velocity.y > 0)
                     {
@@ -224,7 +224,7 @@ public class Demonic : MoveCharacter
                     Attack2();
                     break;
                 }
-                if (!foot.TrigGround)
+                if (!foot.TrigGround && !canFly)
                 {
                     if (rb.velocity.y > 0)
                     {
@@ -288,7 +288,7 @@ public class Demonic : MoveCharacter
                 rb.velocity += Vector3.up * extraRiseGravity * Time.deltaTime;
                 break;
             case CharacterState.Fall:
-                if (foot.TrigGround)
+                if (foot.TrigGround || canFly)
                 {
                     ChangeState(CharacterState.Idle);
                     break;
@@ -327,7 +327,7 @@ public class Demonic : MoveCharacter
                     ChangeState(CharacterState.Idle);
                     break;
                 }
-                if (!foot.TrigGround)
+                if (!foot.TrigGround && !canFly)
                 {
                     rb.velocity += Vector3.up * extraFallGravity * Time.deltaTime;
                 }

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

@@ -138,7 +138,7 @@ public class Enemy : MoveCharacter
                     Attack2();
                     break;
                 }
-                if (!foot.TrigGround)
+                if (!foot.TrigGround && !canFly)
                 {
                     if (rb.velocity.y > 0)
                     {
@@ -164,7 +164,7 @@ public class Enemy : MoveCharacter
                     Attack2();
                     break;
                 }
-                if (!foot.TrigGround)
+                if (!foot.TrigGround && !canFly)
                 {
                     if (rb.velocity.y > 0)
                     {
@@ -228,7 +228,7 @@ public class Enemy : MoveCharacter
                 rb.velocity += Vector3.up * extraRiseGravity * Time.deltaTime;
                 break;
             case CharacterState.Fall:
-                if (foot.TrigGround)
+                if (foot.TrigGround || canFly)
                 {
                     ChangeState(CharacterState.Idle);
                     break;
@@ -267,7 +267,7 @@ public class Enemy : MoveCharacter
                     ChangeState(CharacterState.Idle);
                     break;
                 }
-                if (!foot.TrigGround)
+                if (!foot.TrigGround && !canFly)
                 {
                     rb.velocity += Vector3.up * extraFallGravity * Time.deltaTime;
                 }