Bladeren bron

删除变身后JKL

SZAND\msx_2 1 jaar geleden
bovenliggende
commit
d9b7e6e901

+ 4 - 89
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -109,15 +109,8 @@ public class PlayerController : MoveCharacter
 
     public bool isTransfiguration = false; //已变身
 
-    public bool isinputJ;
-    public bool isinputK;
-    public bool isinputL;
-
     public Vector2 moveVec;         //玩家不动时移动数据
 
-    public float relieveTranTime;   //解除变身所需长按时间
-    private bool isTryingToRelieve = false;
-    private float pressTime;
 
     public bool btnJumpPress
     {
@@ -361,16 +354,6 @@ public class PlayerController : MoveCharacter
         if (isTransfiguration)
         {
             bodyTrans.position = spiritObj.transform.position;
-            if (isTryingToRelieve)
-            {
-                pressTime += Time.deltaTime;
-                if (pressTime >= relieveTranTime)
-                {
-                    EndTransfiguration(endChange);
-                    isTryingToRelieve = false;
-                    pressTime = 0;
-                }
-            }
         }
     }
 
@@ -414,17 +397,6 @@ public class PlayerController : MoveCharacter
         if (!isFloat && canMove)
         {
             isClickBtnWest = true;
-            if (isTransfiguration)
-            {
-                isinputJ = true;
-            }
-        }
-    }
-    void OnSummon0Up()
-    {
-        if (isTransfiguration)
-        {
-            isinputJ = false;
         }
     }
     void OnSummon1()
@@ -432,17 +404,6 @@ public class PlayerController : MoveCharacter
         if (!isFloat && canMove)
         {
             isClickBtnSouth = true;
-            if (isTransfiguration)
-            {
-                isinputK = true;
-            }
-        }
-    }
-    void OnSummon1Up()
-    {
-        if (isTransfiguration)
-        {
-            isinputK = false;
         }
     }
     void OnSummon2()
@@ -450,17 +411,6 @@ public class PlayerController : MoveCharacter
         if (!isFloat && canMove)
         {
             isClickBtnEast = true;
-            if (isTransfiguration)
-            {
-                isinputL = true;
-            }
-        }
-    }
-    void OnSummon2Up()
-    {
-        if (isTransfiguration)
-        {
-            isinputL = false;
         }
     }
     void OnSummonSpirit()
@@ -469,15 +419,7 @@ public class PlayerController : MoveCharacter
             isSpiritSummon = true;
         if (isTransfiguration && currentSpirit == 0)
         {
-            isTryingToRelieve = true;
-        }
-    }
-    void OnSummonSpiritUp()
-    {
-        if (isTryingToRelieve && currentSpirit == 0)
-        {
-            isTryingToRelieve = false;
-            pressTime = 0;
+            
         }
     }
     void OnSummonSpirit1()
@@ -486,15 +428,7 @@ public class PlayerController : MoveCharacter
             isSpiritSummon1 = true;
         if (isTransfiguration && currentSpirit == 1)
         {
-            isTryingToRelieve = true;
-        }
-    }
-    void OnSummonSpirit1Up()
-    {
-        if (isTryingToRelieve && currentSpirit == 1)
-        {
-            isTryingToRelieve = false;
-            pressTime = 0;
+            
         }
     }
     void OnSummonSpirit2()
@@ -503,15 +437,7 @@ public class PlayerController : MoveCharacter
             isSpiritSummon2 = true;
         if (isTransfiguration && currentSpirit == 2)
         {
-            isTryingToRelieve = true;
-        }
-    }
-    void OnSummonSpirit2Up()
-    {
-        if (isTryingToRelieve && currentSpirit == 2)
-        {
-            isTryingToRelieve = false;
-            pressTime = 0;
+            
         }
     }
     void OnSummonSpirit3()
@@ -520,15 +446,7 @@ public class PlayerController : MoveCharacter
             isSpiritSummon3 = true;
         if (isTransfiguration && currentSpirit == 3)
         {
-            isTryingToRelieve = true;
-        }
-    }
-    void OnSummonSpirit3Up()
-    {
-        if (isTryingToRelieve && currentSpirit == 3)
-        {
-            isTryingToRelieve = false;
-            pressTime = 0;
+            
         }
     }
     public void Jump()
@@ -1590,9 +1508,6 @@ public class PlayerController : MoveCharacter
     public void EndTransfiguration(int id)
     {
         isTransfiguration = false;
-        isinputJ = false;
-        isinputK = false;
-        isinputL = false;
         canfly = false;
         canJump = true;
         canMove = true;

+ 2 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Trans_Cook.cs

@@ -65,6 +65,7 @@ public class Trans_Cook : MonoBehaviour
         }
     }
 
+    /*
     private void Update()
     {
         if (!canAttack)
@@ -96,4 +97,5 @@ public class Trans_Cook : MonoBehaviour
             BottleMove();
         }
     }
+    */
 }

+ 2 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Trans_Float.cs

@@ -103,6 +103,7 @@ public class Trans_Float : MonoBehaviour
         continueRange = (maxRange - minRange) / keepFloatTime;
     }
 
+    /*
     private void Update()
     {
         //Ӳֱ
@@ -258,4 +259,5 @@ public class Trans_Float : MonoBehaviour
             }
         }
     }
+    */
 }

+ 2 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Trans_Invisible.cs

@@ -57,6 +57,7 @@ public class Trans_Invisible : MonoBehaviour
             playerController.beTargetCharacter[i].targetCharacter = null;
         }
     }
+    /*
     private void Update()
     {
         if (playerController.isinputJ)
@@ -177,4 +178,5 @@ public class Trans_Invisible : MonoBehaviour
         soulFollowEffect.SoulChangeColor(soulFollowEffect.boomSoulNumber - 1,true);
         soulFollowEffect.isBooming = true;
     }
+    */
 }