LAPTOP-OM1V99U2\永远de小亡灵 1 an în urmă
părinte
comite
36eb0ec570
1 a modificat fișierele cu 25 adăugiri și 9 ștergeri
  1. 25 9
      ActionTowerDefense/Assets/Scripts/PlayerController.cs

+ 25 - 9
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -161,6 +161,16 @@ public class PlayerController : MoveCharacter
     }
     [HideInInspector]
     public bool isClickBtnEast;
+    public bool btnTransfiguratePress
+    {
+        get
+        {
+            //return Input.GetKeyDown(KeyCode.L) || isClickBtnEast;
+            return isClickBtnTransfigurate;
+        }
+    }
+    [HideInInspector]
+    public bool isClickBtnTransfigurate;
     public bool btnWestPress
     {
         get
@@ -461,15 +471,7 @@ public class PlayerController : MoveCharacter
     {
         if (!isFloat && canMove)
         {
-            if (!isTransfiguration)
-            {
-                Transfiguration((int)spirits.currentSpirit + 3);
-            }
-            else
-            {
-                isUltimate = true;
-                keyTransfigurateRelease = false;
-            }
+
         }
     }
 
@@ -539,6 +541,19 @@ public class PlayerController : MoveCharacter
             Summon(2);
             return true;
         }
+        if (btnTransfiguratePress)
+        {
+            if (!isTransfiguration)
+            {
+                Transfiguration((int)spirits.currentSpirit + 3);
+            }
+            else
+            {
+                isUltimate = true;
+                keyTransfigurateRelease = false;
+            }
+            return true;
+        }
         if (isSpiritSummon)
         {
             Transfiguration(3);
@@ -1217,6 +1232,7 @@ public class PlayerController : MoveCharacter
         isSpiritSummon1 = false;
         isSpiritSummon2 = false;
         isSpiritSummon3 = false;
+        isClickBtnTransfigurate = false;
 
         if (foot.TrigGround)
         {