瀏覽代碼

传送门移到出怪表里

LAPTOP-OM1V99U2\永远de小亡灵 1 年之前
父節點
當前提交
9d4cf0ba01

+ 8 - 1
ActionTowerDefense/Assets/Gen/SingleCreateEnemyConfig.cs

@@ -25,6 +25,7 @@ public sealed partial class SingleCreateEnemyConfig :  Bright.Config.BeanBase
         { if(!_json["TimeInterval"].IsNumber) { throw new SerializationException(); }  TimeInterval = _json["TimeInterval"]; }
         { var __json0 = _json["Position"]; if(!__json0.IsArray) { throw new SerializationException(); } Position = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0;  { if(!__e0.IsNumber) { throw new SerializationException(); }  __v0 = __e0; }  Position.Add(__v0); }   }
         { if(!_json["PortalsID"].IsNumber) { throw new SerializationException(); }  PortalsID = _json["PortalsID"]; }
+        { var __json0 = _json["Scale"]; if(!__json0.IsArray) { throw new SerializationException(); } Scale = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0;  { if(!__e0.IsNumber) { throw new SerializationException(); }  __v0 = __e0; }  Scale.Add(__v0); }   }
         { if(!_json["YRandomRange"].IsNumber) { throw new SerializationException(); }  YRandomRange = _json["YRandomRange"]; }
         { if(!_json["ZRandomRange"].IsNumber) { throw new SerializationException(); }  ZRandomRange = _json["ZRandomRange"]; }
         { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); }  AttackRatio = _json["AttackRatio"]; }
@@ -32,7 +33,7 @@ public sealed partial class SingleCreateEnemyConfig :  Bright.Config.BeanBase
         PostInit();
     }
 
-    public SingleCreateEnemyConfig(int ID, int EnemyID, int Count, float Time, float TimeInterval, System.Collections.Generic.List<float> Position, int PortalsID, float YRandomRange, float ZRandomRange, float AttackRatio, float HPRatio ) 
+    public SingleCreateEnemyConfig(int ID, int EnemyID, int Count, float Time, float TimeInterval, System.Collections.Generic.List<float> Position, int PortalsID, System.Collections.Generic.List<float> Scale, float YRandomRange, float ZRandomRange, float AttackRatio, float HPRatio ) 
     {
         this.ID = ID;
         this.EnemyID = EnemyID;
@@ -41,6 +42,7 @@ public sealed partial class SingleCreateEnemyConfig :  Bright.Config.BeanBase
         this.TimeInterval = TimeInterval;
         this.Position = Position;
         this.PortalsID = PortalsID;
+        this.Scale = Scale;
         this.YRandomRange = YRandomRange;
         this.ZRandomRange = ZRandomRange;
         this.AttackRatio = AttackRatio;
@@ -82,6 +84,10 @@ public sealed partial class SingleCreateEnemyConfig :  Bright.Config.BeanBase
     /// </summary>
     public int PortalsID { get; private set; }
     /// <summary>
+    /// 传送门朝向
+    /// </summary>
+    public System.Collections.Generic.List<float> Scale { get; private set; }
+    /// <summary>
     /// Y轴随机范围
     /// </summary>
     public float YRandomRange { get; private set; }
@@ -120,6 +126,7 @@ public sealed partial class SingleCreateEnemyConfig :  Bright.Config.BeanBase
         + "TimeInterval:" + TimeInterval + ","
         + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
         + "PortalsID:" + PortalsID + ","
+        + "Scale:" + Bright.Common.StringUtil.CollectionToString(Scale) + ","
         + "YRandomRange:" + YRandomRange + ","
         + "ZRandomRange:" + ZRandomRange + ","
         + "AttackRatio:" + AttackRatio + ","

+ 2 - 1
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Arrow.prefab

@@ -1026,7 +1026,7 @@ MonoBehaviour:
     changeHurt: 0
     repelValue: 2
   attackTriggers: []
-  targetTypes: 040000000500000006000000
+  targetTypes: 04000000050000000600000007000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
   beTargetCharacter: []
@@ -1037,6 +1037,7 @@ MonoBehaviour:
   joint: {fileID: 0}
   rope: {fileID: 0}
   beLarger: 0
+  toLargeSize: 0
   cookEffect: {fileID: 0}
   matState: 1
   spinee: {fileID: 0}

+ 2 - 1
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Giant.prefab

@@ -587,7 +587,7 @@ MonoBehaviour:
     repelValue: 31
   attackTriggers:
   - {fileID: 7729941002223262554}
-  targetTypes: 040000000500000006000000
+  targetTypes: 04000000050000000600000007000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
   beTargetCharacter: []
@@ -598,6 +598,7 @@ MonoBehaviour:
   joint: {fileID: 0}
   rope: {fileID: 0}
   beLarger: 0
+  toLargeSize: 0
   cookEffect: {fileID: 0}
   matState: 1
   spinee: {fileID: 0}

+ 2 - 1
ActionTowerDefense/Assets/Resources/Prefab/Demonic_Sword.prefab

@@ -216,7 +216,7 @@ MonoBehaviour:
     repelValue: 50
   attackTriggers:
   - {fileID: 4347565098670608659}
-  targetTypes: 040000000500000006000000
+  targetTypes: 04000000050000000600000007000000
   targetCharacter: {fileID: 0}
   attackTarget: {fileID: 0}
   beTargetCharacter: []
@@ -227,6 +227,7 @@ MonoBehaviour:
   joint: {fileID: 0}
   rope: {fileID: 0}
   beLarger: 0
+  toLargeSize: 0
   cookEffect: {fileID: 0}
   matState: 1
   spinee: {fileID: 0}

File diff suppressed because it is too large
+ 210 - 656
ActionTowerDefense/Assets/Resources/Prefab/Portal/Portals.prefab


+ 5 - 1
ActionTowerDefense/Assets/Scenes/SampleScene.unity

@@ -29187,7 +29187,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 693438331589553446, guid: 7718014a1b52a1741a361cac211579a3, type: 3}
       propertyPath: m_LocalPosition.x
-      value: 27.05
+      value: 27
       objectReference: {fileID: 0}
     - target: {fileID: 693438331589553446, guid: 7718014a1b52a1741a361cac211579a3, type: 3}
       propertyPath: m_LocalPosition.y
@@ -29229,6 +29229,10 @@ PrefabInstance:
       propertyPath: m_Name
       value: Portals
       objectReference: {fileID: 0}
+    - target: {fileID: 693438331589553447, guid: 7718014a1b52a1741a361cac211579a3, type: 3}
+      propertyPath: m_IsActive
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 716715567097125074, guid: 7718014a1b52a1741a361cac211579a3, type: 3}
       propertyPath: m_IsActive
       value: 1

+ 18 - 0
ActionTowerDefense/Assets/Scripts/Bullet.cs

@@ -33,11 +33,29 @@ public class Bullet : MonoBehaviour
     private Vector3 curDir;
     private bool hasBack = false;       //已经回来了
 
+    [Header("传送门")]
+    public bool haveTransmit;           //刚传送过
+    [HideInInspector]
+    public float transmitTime;          //传送CD
+    public PortalsController portalsController;
+
     private void Awake()
     {
         //owner = GetComponentInParent<Character>();
         rb = GetComponent<Rigidbody>();
     }
+    private void Update()
+    {
+        if (haveTransmit)
+        {
+            transmitTime -= Time.deltaTime;
+            if (transmitTime <= 0)
+            {
+                haveTransmit = false;
+                portalsController.rbs.Remove(rb);
+            }
+        }
+    }
 
     private void FixedUpdate()
     {

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Enemy.cs

@@ -15,6 +15,7 @@ public enum TargetType
     Enemy = 4,
     EnemyTower = 5,
     Boss = 6,
+    Portal = 7,
 }
 
 public enum SearchState

+ 38 - 3
ActionTowerDefense/Assets/Scripts/EnemyCreater.cs

@@ -45,7 +45,35 @@ public class EnemyCreater : MonoBehaviour
             if (cfgCreateEnemy[i].Time <= gameTime && !created[i])
             {
                 created[i] = true;
-                StartCreateEnemy(i);
+                if(cfgCreateEnemy[i].EnemyID > 2000)
+                {
+                    SingleEnemyConfig cfgEnemy =
+                        GameManager.instance.allCfgData.CfgEnemy.Get(cfgCreateEnemy[i].EnemyID);
+                    GameObject prefab;
+                    GameObject enemyObj;
+                    prefab = Resources.Load<GameObject>(cfgEnemy.EnemyPrefab);
+                    if (prefab == null)
+                    {
+                        Debug.LogError("δ¶ÁÈ¡µ½prefab:" + cfgEnemy.EnemyPrefab);
+                        continue;
+                    }
+                    else
+                    {
+                        enemyObj = Instantiate(prefab);
+                        enemyObj.SetActive(true);
+                    }
+                    PortalsCreater portalsCreater = enemyObj.GetComponentInChildren<PortalsCreater>();
+                    portals.Add(portalsCreater.transform.GetChild(0).gameObject);
+                    portalsCreater.Init(
+                        (int)(cfgEnemy.HP * cfgCreateEnemy[i].HPRatio),
+                        cfgCreateEnemy[i].Position,
+                        cfgCreateEnemy[i].Scale);
+                }
+                else
+                {
+                    StartCreateEnemy(i);
+                }
+                
             }
         }
     }
@@ -60,7 +88,7 @@ public class EnemyCreater : MonoBehaviour
                 return;
             }
             Vector3 pos;
-            if(singleCreateEnemy.PortalsID == -1)
+            if (singleCreateEnemy.PortalsID == 0)
             {
                 pos = new Vector3(
                     singleCreateEnemy.Position[0],
@@ -72,10 +100,17 @@ public class EnemyCreater : MonoBehaviour
             else
             {
                 pos = portals[singleCreateEnemy.PortalsID].transform.position;
+                if(portals[singleCreateEnemy.PortalsID].transform.localScale.x > 0)
+                {
+                    pos.x -= 1;
+                }
+                else
+                {
+                    pos.x += 1;
+                }
                 pos.y += Random.Range(-singleCreateEnemy.YRandomRange / 2, singleCreateEnemy.YRandomRange / 2);
                 pos.z += Random.Range(-singleCreateEnemy.ZRandomRange / 2, singleCreateEnemy.ZRandomRange / 2);
             }
-
             CreateEnemy(singleCreateEnemy.EnemyID, pos, singleCreateEnemy.HPRatio, singleCreateEnemy.AttackRatio);
             await Task.Delay((int)(singleCreateEnemy.TimeInterval * 1000));
         }

+ 6 - 5
ActionTowerDefense/Assets/Scripts/Portal/CoreCharacter.cs

@@ -50,16 +50,17 @@ public class CoreCharacter : Character
     {
         bodyTrans.gameObject.SetActive(false);
         uiHp.gameObject.SetActive(false);
-        foreach (TextMeshProUGUI text in countDown)
+        for(int i = 0; i < countDown.Length; i++)
         {
-            if (transform.parent.transform.localScale.x < 0)
+            if (portals[i].transform.localScale.x < 0)
             {
-                Vector3 localScale = text.transform.localScale;
+                Vector3 localScale = countDown[i].transform.localScale;
                 localScale.x = -localScale.x;
-                text.transform.localScale = localScale;
+                countDown[i].transform.localScale = localScale;
             }
-            text.gameObject.SetActive(true);
+            countDown[i].gameObject.SetActive(true);
         }
+        
         time = totalTime;
         isCoutDown = true;
     }

+ 56 - 16
ActionTowerDefense/Assets/Scripts/Portal/PortalsController.cs

@@ -7,6 +7,7 @@ public class PortalsController : MonoBehaviour
     public PortalsController targetPortal;              //传送目标
     public List<Rigidbody> rbs = new List<Rigidbody>(); //通过当前传送门的单位
     public float TransmitCD;                            //每个单位传送的CD
+    public bool isReverse;                              //传送门朝向是否相反
 
     private void OnTriggerEnter(Collider other)
     {
@@ -15,22 +16,14 @@ public class PortalsController : MonoBehaviour
         if (beSearchTrigger != null)
         {
             Rigidbody rb = beSearchTrigger.GetComponentInParent<Rigidbody>();
-            if (!targetPortal.rbs.Exists(t => t == rb))
+            if (Transmit(rb))
             {
-                if (!rbs.Exists(t => t == rb))
+                MoveCharacter moveCharacter = rb.GetComponent<MoveCharacter>();
+                if (moveCharacter != null)
                 {
-                    if ((transform.parent.localScale.x > 0 && rb.velocity.x > 0) ||
-                        (transform.parent.localScale.x < 0 && rb.velocity.x < 0))
-                    {
-                        rbs.Add(rb);
-                        Vector3 targetPos = targetPortal.transform.position;
-                        targetPos.y += rb.transform.position.y - transform.position.y;
-                        rb.transform.position = targetPos;
-                        MoveCharacter moveCharacter = rb.GetComponent<MoveCharacter>();
-                        moveCharacter.portalsController = this;
-                        moveCharacter.transmitTime = TransmitCD;
-                        moveCharacter.haveTransmit = true;
-                    }
+                    moveCharacter.portalsController = this;
+                    moveCharacter.transmitTime = TransmitCD;
+                    moveCharacter.haveTransmit = true;
                 }
             }
             return;
@@ -40,16 +33,63 @@ public class PortalsController : MonoBehaviour
         if(bullet != null)
         {
             Rigidbody rb = bullet.GetComponentInParent<Rigidbody>();
-            if (!targetPortal.rbs.Exists(t => t == rb))
+            if (Transmit(rb))
             {
-                if (!rbs.Exists(t => t == rb))
+                bullet.portalsController = this;
+                bullet.transmitTime = TransmitCD;
+                bullet.haveTransmit = true;
+            }
+            return;
+        }
+        //传送魂
+        Soul soul = other.GetComponent<Soul>();
+        if(soul != null)
+        {
+            Rigidbody rb = soul.GetComponent<Rigidbody>();
+            if (Transmit(rb))
+            {
+                soul.portalsController = this;
+                soul.transmitTime = TransmitCD;
+                soul.haveTransmit = true;
+            }
+            return;
+        }
+    }
+
+    //传送
+    public bool Transmit(Rigidbody rb)
+    {
+       
+        if (!targetPortal.rbs.Exists(t => t == rb))
+        {
+            if (!rbs.Exists(t => t == rb))
+            {
+                if ((transform.parent.localScale.x > 0 && rb.velocity.x > 0) ||
+                    (transform.parent.localScale.x < 0 && rb.velocity.x < 0))
                 {
                     rbs.Add(rb);
                     Vector3 targetPos = targetPortal.transform.position;
+                    if (targetPortal.transform.parent.localScale.x > 0)
+                    {
+                        targetPos.x -= 1;
+                    }
+                    else
+                    {
+                        targetPos.x += 1;
+                    }
+                    
                     targetPos.y += rb.transform.position.y - transform.position.y;
                     rb.transform.position = targetPos;
+                    if (!isReverse)
+                    {
+                        Vector3 velocity = rb.velocity;
+                        velocity.x = -velocity.x;
+                        rb.velocity = velocity;
+                    }
+                    return true;
                 }
             }
         }
+        return false;
     }
 }

+ 30 - 0
ActionTowerDefense/Assets/Scripts/Portal/PortalsCreater.cs

@@ -0,0 +1,30 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class PortalsCreater : MonoBehaviour
+{
+    public GameObject[] portal = new GameObject[2];
+    public PortalsController[] portalsControllers = new PortalsController[2];
+    public CoreCharacter coreCharacter;
+    public void Init(int totalHP, List<float> position, List<float> scale)
+    {
+        transform.position = Vector3.zero;
+        for(int i = 0; i < portal.Length; i++)
+        {
+            portal[i].transform.position = 
+                new Vector3(position[0 + i * 3], position[1 + i * 3], position[2 + i * 3]);
+            Vector3 localScale = portal[i].transform.localScale;
+            portal[i].transform.localScale =
+                new Vector3(localScale.x * scale[i], localScale.y, localScale.z);
+        }
+        if (scale[0] != scale[1])
+        {
+            portalsControllers[0].isReverse = true;
+            portalsControllers[1].isReverse = true;
+        }
+        coreCharacter.totalHp = totalHP;
+        coreCharacter.hp = totalHP;
+        coreCharacter.uiHp.Show(totalHP, totalHP);
+    }
+}

+ 11 - 0
ActionTowerDefense/Assets/Scripts/Portal/PortalsCreater.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 53ec2c8d52251f84f87a1029c11fdfee
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 1
ActionTowerDefense/Assets/Scripts/SearchTrigger.cs

@@ -91,7 +91,8 @@ public class SearchTrigger : MonoBehaviour
                 || trigObjList[i].owner.tag == "Player" && HasTargetType(targetTypes, TargetType.Player)
                 || trigObjList[i].owner.tag == "Enemy" && HasTargetType(targetTypes, TargetType.Enemy)
                 || trigObjList[i].owner.tag == "EnemyTower" && HasTargetType(targetTypes, TargetType.EnemyTower)
-                || trigObjList[i].owner.tag == "Boss" && HasTargetType(targetTypes, TargetType.Boss))
+                || trigObjList[i].owner.tag == "Boss" && HasTargetType(targetTypes, TargetType.Boss)
+                || trigObjList[i].owner.tag == "Portal" && HasTargetType(targetTypes, TargetType.Portal))
             {
                 Character character = trigObjList[i].owner;
                 if (!character.gameObject.activeInHierarchy || character.isDie)

+ 18 - 0
ActionTowerDefense/Assets/Scripts/Soul.cs

@@ -26,6 +26,12 @@ public class Soul : MonoBehaviour
 
     public bool Spirits_Invisible_NotFind;
 
+    [Header("´«ËÍÃÅ")]
+    public bool haveTransmit;           //¸Õ´«Ë͹ý
+    [HideInInspector]
+    public float transmitTime;          //´«ËÍCD
+    public PortalsController portalsController;
+
     private void Awake()
     {
         SoulInMap.souls.Add(this);
@@ -57,6 +63,18 @@ public class Soul : MonoBehaviour
         PlayersInput.instance[id].mp += addMp;
     }
 
+    private void Update()
+    {
+        if (haveTransmit)
+        {
+            transmitTime -= Time.deltaTime;
+            if (transmitTime <= 0)
+            {
+                haveTransmit = false;
+                portalsController.rbs.Remove(rb);
+            }
+        }
+    }
     private void FixedUpdate()
     {
         if (isShoot)

+ 68 - 33
ActionTowerDefense/GenerateDatas/json/cfgcreateenemy.json

@@ -1,23 +1,44 @@
 [
   {
     "ID": 1,
-    "EnemyID": 1,
-    "Count": 10,
+    "EnemyID": 2001,
+    "Count": 1,
     "Time": 3,
-    "TimeInterval": 2,
+    "TimeInterval": 1,
     "Position": [
+      30,
+      11,
       0,
-      0,
+      150,
+      -1,
       0
     ],
-    "PortalsID": 0,
+    "PortalsID": 1,
+    "Scale": [
+      -1,
+      -1
+    ],
     "YRandomRange": 0,
     "ZRandomRange": 0,
-    "AttackRatio": 1,
+    "AttackRatio": 0,
     "HPRatio": 1
   },
   {
     "ID": 2,
+    "EnemyID": 1,
+    "Count": 10,
+    "Time": 5,
+    "TimeInterval": 1,
+    "Position": [],
+    "PortalsID": 1,
+    "Scale": [],
+    "YRandomRange": 0,
+    "ZRandomRange": 0,
+    "AttackRatio": 1,
+    "HPRatio": 1
+  },
+  {
+    "ID": 3,
     "EnemyID": 2,
     "Count": 10,
     "Time": 10,
@@ -27,14 +48,15 @@
       7,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 2,
     "ZRandomRange": 4,
     "AttackRatio": 1.2,
     "HPRatio": 1.1
   },
   {
-    "ID": 3,
+    "ID": 4,
     "EnemyID": 3,
     "Count": 10,
     "Time": 30,
@@ -44,14 +66,15 @@
       0,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 4,
     "AttackRatio": 1.4,
     "HPRatio": 1.2
   },
   {
-    "ID": 4,
+    "ID": 5,
     "EnemyID": 4,
     "Count": 2,
     "Time": 50,
@@ -61,14 +84,15 @@
       0,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 4,
     "AttackRatio": 1.6,
     "HPRatio": 1.3
   },
   {
-    "ID": 5,
+    "ID": 6,
     "EnemyID": 2,
     "Count": 15,
     "Time": 90,
@@ -78,14 +102,15 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 4,
     "ZRandomRange": 4,
     "AttackRatio": 1.8,
     "HPRatio": 1.4
   },
   {
-    "ID": 6,
+    "ID": 7,
     "EnemyID": 3,
     "Count": 15,
     "Time": 120,
@@ -95,14 +120,15 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 4,
     "ZRandomRange": 4,
     "AttackRatio": 2,
     "HPRatio": 1.5
   },
   {
-    "ID": 7,
+    "ID": 8,
     "EnemyID": 5,
     "Count": 2,
     "Time": 150,
@@ -112,14 +138,15 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 3,
     "ZRandomRange": 4,
     "AttackRatio": 2.2,
     "HPRatio": 1.6
   },
   {
-    "ID": 8,
+    "ID": 9,
     "EnemyID": 7,
     "Count": 2,
     "Time": 200,
@@ -129,14 +156,15 @@
       0,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 4,
     "AttackRatio": 2.4,
     "HPRatio": 1.7
   },
   {
-    "ID": 9,
+    "ID": 10,
     "EnemyID": 1,
     "Count": 20,
     "Time": 220,
@@ -146,14 +174,15 @@
       0,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 4,
     "AttackRatio": 2.6,
     "HPRatio": 1.8
   },
   {
-    "ID": 10,
+    "ID": 11,
     "EnemyID": 2,
     "Count": 15,
     "Time": 240,
@@ -163,14 +192,15 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 4,
     "ZRandomRange": 4,
     "AttackRatio": 2.8,
     "HPRatio": 1.9
   },
   {
-    "ID": 11,
+    "ID": 12,
     "EnemyID": 4,
     "Count": 3,
     "Time": 260,
@@ -180,14 +210,15 @@
       0,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 0,
     "AttackRatio": 3,
     "HPRatio": 2
   },
   {
-    "ID": 12,
+    "ID": 13,
     "EnemyID": 5,
     "Count": 1,
     "Time": 300,
@@ -197,14 +228,15 @@
       0,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 0,
     "AttackRatio": 3.2,
     "HPRatio": 2.1
   },
   {
-    "ID": 13,
+    "ID": 14,
     "EnemyID": 2,
     "Count": 20,
     "Time": 340,
@@ -214,14 +246,15 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 4,
     "ZRandomRange": 0,
     "AttackRatio": 3.4,
     "HPRatio": 2.2
   },
   {
-    "ID": 14,
+    "ID": 15,
     "EnemyID": 4,
     "Count": 1,
     "Time": 360,
@@ -231,14 +264,15 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 0,
     "AttackRatio": 3.6,
     "HPRatio": 2.3
   },
   {
-    "ID": 15,
+    "ID": 16,
     "EnemyID": 7,
     "Count": 1,
     "Time": 400,
@@ -248,7 +282,8 @@
       3,
       0
     ],
-    "PortalsID": -1,
+    "PortalsID": 0,
+    "Scale": [],
     "YRandomRange": 0,
     "ZRandomRange": 0,
     "AttackRatio": 3.8,

+ 7 - 0
ActionTowerDefense/GenerateDatas/json/cfgenemy.json

@@ -86,5 +86,12 @@
     "Attack2": [
       0
     ]
+  },
+  {
+    "ID": 2001,
+    "EnemyPrefab": "Prefab/Portal/Portals",
+    "HP": 1000,
+    "Attack1": [],
+    "Attack2": []
   }
 ]

+ 5 - 5
ActionTowerDefense/Luban/.cache.meta

@@ -1,12 +1,12 @@
 D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/CfgCreateEnemy.cs,3A9B470F9A1FA351330EA275C82C399,1404,1720757251245
 D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/CfgEnemy.cs,FDE1CE1B09C67F343EE84B2F88F27A6,1820,1720757251245
-D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleCreateEnemyConfig.cs,94F69187DC4291E98A2B8124104171F1,5035,1724204421056
+D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleCreateEnemyConfig.cs,4C777015AF4D769778BD249DF6387514,5653,1724292311337
 D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/SingleEnemyConfig.cs,D5F643F55C5C4765F3F8EFC19A64C96,3343,1721976818442
 D:/ActionTowerDefense/ActionTowerDefense/Assets/Gen/Tables.cs,912B477615DA4F7C6B7D4A0EE96B27A,1296,1720757251246
-D:/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgcreateenemy.json,87FAC7BE8EA95857471CF2CD2A92B40,4112,1724210023095
-D:/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgenemy.json,23C70C49159E182C3605CEDC07D7582,1278,1724204421056
+D:/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgcreateenemy.json,EDC47E5F97A4EBC1E58B26A527606AEB,4684,1724298639053
+D:/ActionTowerDefense/ActionTowerDefense/GenerateDatas/json/cfgenemy.json,F827BE647A734914D6C250303F1B4EDD,1407,1724292311338
 D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__beans__.xlsx,98987DA7288FEE34BCD08EA883D425E,9603,1719819418545
 D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__enums__.xlsx,647733322F7261DFA483C2DBE2D1F9A4,10293,1719819418545
 D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/__tables__.xlsx,D1BC5823EBCE916872405D2DCDC896D,10232,1719819418546
-D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/出怪表.xlsx,4310EC836E3036A9A1F77CDDDEA673DC,10701,1724210020368
-D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/怪物表.xlsx,6659809E60F944C62D234EFB397FFBC,9866,1724145057067
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/出怪表.xlsx,E8E76E8A635163EB799217E7F6810EF,11508,1724298630010
+D:/ActionTowerDefense/ActionTowerDefense/Luban/Config/Datas/怪物表.xlsx,845F799423AA1FD43D66C4BF1DAEECB8,9917,1724237401340

二進制
ActionTowerDefense/Luban/Config/Datas/出怪表.xlsx


二進制
ActionTowerDefense/Luban/Config/Datas/怪物表.xlsx


+ 1 - 1
ActionTowerDefense/ProjectSettings/DynamicsManager.asset

@@ -18,7 +18,7 @@ PhysicsManager:
   m_ClothInterCollisionDistance: 0.1
   m_ClothInterCollisionStiffness: 0.2
   m_ContactsGeneration: 1
-  m_LayerCollisionMatrix: ffe7ffffffe7ffffffe7fffffff7ffffffe7ffffffe7ffff3f40feff3f40feff3f40feff3fe0feff3fe0feff0090feff08a8feff3fb6feffff87ffff3ffefeff3f40feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+  m_LayerCollisionMatrix: ffe7ffffffe7ffffffe7fffffff7ffffffe7ffffffe7ffff3fc0feff3fc0feff3fc0feff3fe0feff3fe0feff0090feff08a8feff3fb6feffff87fffffffffeff3f40feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
   m_AutoSimulation: 1
   m_AutoSyncTransforms: 0
   m_ReuseCollisionCallbacks: 1

Some files were not shown because too many files changed in this diff