Преглед на файлове

注释原有InputSystem

LAPTOP-OM1V99U2\永远de小亡灵 преди 1 година
родител
ревизия
6c4e1bae3e
променени са 1 файла, в които са добавени 28 реда и са изтрити 21 реда
  1. 28 21
      ActionTowerDefense/Assets/Scripts/PlayerController.cs

+ 28 - 21
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -124,7 +124,8 @@ public class PlayerController : MoveCharacter
     {
         get
         {
-            return Input.GetKeyDown(KeyCode.K) || isClickBtnSouth;
+            //return Input.GetKeyDown(KeyCode.K) || isClickBtnSouth;
+            return isClickBtnSouth;
         }
     }
     [HideInInspector]
@@ -133,7 +134,8 @@ public class PlayerController : MoveCharacter
     {
         get
         {
-            return Input.GetKeyDown(KeyCode.L) || isClickBtnEast;
+            //return Input.GetKeyDown(KeyCode.L) || isClickBtnEast;
+            return  isClickBtnEast;
         }
     }
     [HideInInspector]
@@ -142,7 +144,8 @@ public class PlayerController : MoveCharacter
     {
         get
         {
-            return Input.GetKeyDown(KeyCode.J) || isClickBtnWest;
+            //return Input.GetKeyDown(KeyCode.J) || isClickBtnWest;
+            return isClickBtnWest;
         }
     }
     [HideInInspector]
@@ -151,7 +154,8 @@ public class PlayerController : MoveCharacter
     {
         get
         {
-            return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
+            //return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
+            return isClickBtnNorth;
         }
     }
     [HideInInspector]
@@ -160,7 +164,8 @@ public class PlayerController : MoveCharacter
     {
         get
         {
-            return Input.GetKey(KeyCode.I) || isKeepBtnNorth;
+            //return Input.GetKey(KeyCode.I) || isKeepBtnNorth;
+            return  isKeepBtnNorth;
         }
     }
     [HideInInspector]
@@ -201,6 +206,7 @@ public class PlayerController : MoveCharacter
 
     private void Awake()
     {
+        transform.position = new Vector3(144, 0, 0);
         if (!PlayersInput.instance[0])
         {
             PlayersInput.instance[0] = this;
@@ -230,26 +236,27 @@ public class PlayerController : MoveCharacter
         //    isClickBtnJump = true;
         //}
 
-        if (Input.GetKeyDown(KeyCode.J))
-        {
-            isClickBtnWest = true;
-        }
-        if (Input.GetKeyDown(KeyCode.K))
-        {
-            isClickBtnSouth = true;
-        }
-        if (Input.GetKeyDown(KeyCode.L))
-        {
-            isClickBtnEast = true;
-        }
-        if (Input.GetKeyDown(KeyCode.I))
-        {
-            isClickBtnNorth = true;
-        }
+        //if (Input.GetKeyDown(KeyCode.J))
+        //{
+        //    isClickBtnWest = true;
+        //}
+        //if (Input.GetKeyDown(KeyCode.K))
+        //{
+        //    isClickBtnSouth = true;
+        //}
+        //if (Input.GetKeyDown(KeyCode.L))
+        //{
+        //    isClickBtnEast = true;
+        //}
+        //if (Input.GetKeyDown(KeyCode.I))
+        //{
+        //    isClickBtnNorth = true;
+        //}
     }
     //ÊÖ±ú°´ÏÂLB
     void OnSprinting()
     {
+        print("sprint");
         if (!isKeepBtnRush)
         {
             isClickBtnRush = true;