diff --git a/Ora1/Assets/Scripts/PlayerController.cs b/Ora1/Assets/Scripts/PlayerController.cs index d7b88eb..b17efc8 100644 --- a/Ora1/Assets/Scripts/PlayerController.cs +++ b/Ora1/Assets/Scripts/PlayerController.cs @@ -2,21 +2,16 @@ using UnityEngine; public class PlayerController : MonoBehaviour { - private float direction = 1.0f; [SerializeField][Range(0.1f, 50f)] private float moveSpeed = 0.5f; + [SerializeField] private float vertical; + [SerializeField] private float horizontal; private void Update() { - Debug.Log("FPS: " + (1.0f / Time.deltaTime)); - - if (transform.position.z >= 175) - { - direction = -direction; - }else if (transform.position.z <= 10) - { - direction = -direction; - } + horizontal = Input.GetAxisRaw("Horizontal"); + vertical = Input.GetAxisRaw("Vertical"); - transform.Translate(0.0f, 0.0f, moveSpeed * direction * Time.deltaTime); + transform.Translate(Vector3.forward * (vertical * Time.deltaTime * moveSpeed)); + transform.Rotate(Vector3.up * (horizontal * Time.deltaTime * moveSpeed)); } -} +} \ No newline at end of file diff --git a/Ora1/Packages/manifest.json b/Ora1/Packages/manifest.json index 5036b44..3636a1d 100644 --- a/Ora1/Packages/manifest.json +++ b/Ora1/Packages/manifest.json @@ -2,11 +2,11 @@ "dependencies": { "com.unity.collab-proxy": "2.11.3", "com.unity.feature.development": "1.0.1", - "com.unity.textmeshpro": "3.0.7", + "com.unity.textmeshpro": "3.0.9", "com.unity.timeline": "1.7.7", "com.unity.toolchain.linux-x86_64": "2.0.11", "com.unity.ugui": "1.0.0", - "com.unity.visualscripting": "1.9.4", + "com.unity.visualscripting": "1.9.9", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/Ora1/Packages/packages-lock.json b/Ora1/Packages/packages-lock.json index ce1d4ae..48ac5f7 100644 --- a/Ora1/Packages/packages-lock.json +++ b/Ora1/Packages/packages-lock.json @@ -112,7 +112,7 @@ "url": "https://packages.unity.com" }, "com.unity.textmeshpro": { - "version": "3.0.7", + "version": "3.0.9", "depth": 0, "source": "registry", "dependencies": { @@ -152,7 +152,7 @@ } }, "com.unity.visualscripting": { - "version": "1.9.4", + "version": "1.9.9", "depth": 0, "source": "registry", "dependencies": {