瀏覽代碼

修复有几只胖子就要按几次下的bug

1243896040 3 周之前
父節點
當前提交
07c941c80a

+ 1 - 11
ActionTowerDefense/Assets/Resources/Prefab/Player.prefab

@@ -5838,6 +5838,7 @@ MonoBehaviour:
   leaveGroundCanJumpTime: 0.15
   cacheJumpTime: 0
   totalCacheJumpTime: 0.2
+  platformVariance: 0.1
   flySpeed: 8
   playerMaxFlyHeight: 0
   demonicNums: []
@@ -5872,16 +5873,6 @@ MonoBehaviour:
   fixedDeltaTime: 0
   readyTipFxTime: 0.3
   dienum: 0
-  attackEffect: {fileID: 417478504669294145, guid: 3b9e1b8087a2c2441a51fff8fec35d4f, type: 3}
-  addRate: 0.2
-  mountain: {fileID: 8587706472837483213, guid: d966b0d5004eaad49b37c963f1aaa584, type: 3}
-  mountainOffset: {x: 0, y: 7, z: 0}
-  largeX: 2
-  wavePowerObj: {fileID: 8625694250200680089, guid: 2ee85ceccd170b94b8ba929f3b58af5f, type: 3}
-  wavePowerDamage: 20
-  flyingSwordsObj: {fileID: 256012001268456902, guid: 28fffa39583087344b7b2620e7284dd5, type: 3}
-  angryBulletObj: {fileID: 8625694250200680089, guid: 4a30da3dcf83256468df404f06d44533, type: 3}
-  angryBulletNum: 7
   rebornSkills: []
   isClickBtnJump: 0
   isClickBtnRush: 0
@@ -6429,7 +6420,6 @@ MeshRenderer:
   m_Materials:
   - {fileID: 2100000, guid: 1b17f7962e0b9be49bb10e99c6bd95a6, type: 2}
   - {fileID: 2100000, guid: 0c319badfe2307a48b8810d891649565, type: 2}
-  - {fileID: 2100000, guid: 1b17f7962e0b9be49bb10e99c6bd95a6, type: 2}
   - {fileID: 2100000, guid: 8f08601a75fbb72488593cad9f89acca, type: 2}
   - {fileID: 2100000, guid: 0c319badfe2307a48b8810d891649565, type: 2}
   m_StaticBatchInfo:

+ 11 - 21
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -101,6 +101,7 @@ public class PlayerController : MoveCharacter
     [HideInInspector]
     public float cacheJumpTime; //即将落地时按下跳跃键不会跳跃,手感不好,缓存几帧,在这几帧内落地会立即跳跃;
     public float totalCacheJumpTime = 0.1f;
+    public float platformVariance;
 
     [Header("飞行属性")]
     public float flySpeed = 5;
@@ -142,26 +143,9 @@ public class PlayerController : MoveCharacter
     public float readyTipFxTime;
     public int dienum;
 
-    //攻击力
-    [Header("增加攻击力特效")]
-    public GameObject attackEffect;
-    [Header("攻击力献祭比例")]
-    public float addRate;
-    //泰山压顶
-    [Header("泰山压顶")]
-    public GameObject mountain;
-    public Vector3 mountainOffset;
-    public float largeX;
-    //气功波
-    public GameObject wavePowerObj;
-    [Header("气功波伤害基数")] public int wavePowerDamage;
-    //御剑术
-    public GameObject flyingSwordsObj;
-    //怨气弹
-    public GameObject angryBulletObj;
-    [Header("怨气弹数量基数")] public int angryBulletNum;
     [Header("士兵复活点位")] [ShowInInspector] public List<StoneStatue> rebornSkills = new List<StoneStatue>();
     [Header("死亡士兵统计")] [ShowInInspector] public List<DeadDemonicInformation> deadDemonicList;
+    
     public override int regeneration
     {
         get { return GameManager.instance.regeneration; }
@@ -369,7 +353,6 @@ public class PlayerController : MoveCharacter
                 break;
         }
         demonicDic = new Dictionary<int, List<Demonic>>();
-        deadDemonicList = new List<DeadDemonicInformation>();
         for (int i = 0; i < 5; i++)
         {
             demonicDic.Add(i, new List<Demonic>());
@@ -733,10 +716,19 @@ public class PlayerController : MoveCharacter
             if (leftDir.y < -0.5)
             {
                 Platform platform = foot.trigGroundList[0].GetComponent<Platform>();
+                float plfy = platform.transform.position.y;
                 if (platform != null && platform.canDown)
                 {
                     foot.trigGroundList.Remove(platform.gameObject);
                 }
+                for (int i  = foot.trigGroundList.Count - 1; i>=0 ;i--)
+                {
+                    GameObject platformObj = foot.trigGroundList[i].gameObject;
+                    if(Mathf.Abs(platformObj.transform.position.y - plfy) <= platformVariance)
+                    {
+                        foot.trigGroundList.Remove(platformObj);
+                    }
+                }
             }
             if (canFly)
             {
@@ -1201,7 +1193,6 @@ public class PlayerController : MoveCharacter
         transform.position = new Vector3(towerPos.x + refreshPos.x , towerPos.y+refreshPos.y, 0);
         nextSummonNum = 1;
         GameUI.instance.summonNum.text = nextSummonNum.ToString();
-        deadDemonicList = new List<DeadDemonicInformation>();
         switch (playerId)
         {
             case 0:
@@ -1706,7 +1697,6 @@ public class PlayerController : MoveCharacter
             return;
         }
         demonicDic[demonic.id].Remove(demonic);
-        deadDemonicList.Add(new DeadDemonicInformation(demonic.id));
         if (demonic.id <= 2)
         {
             demonicNums[demonic.id].text = demonicDic[demonic.id].Count.ToString();

文件差異過大導致無法顯示
+ 0 - 0
ActionTowerDefense/Assets/TextMesh Pro/Resources/Fonts & Materials/思源黑体SC-Heavy SDF.asset


部分文件因文件數量過多而無法顯示