From 1f9f6fea67f87e6cb9a466c3c677ea57efa4e4e5 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Sat, 1 Feb 2020 14:05:10 +1100 Subject: [PATCH] fixed merges --- Assets/LeanTween.meta | 8 ++++++++ Assets/Plugins.meta | 8 ++++++++ Assets/Scripts/Input/PlayerController.cs | 9 ++++----- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 Assets/LeanTween.meta create mode 100644 Assets/Plugins.meta diff --git a/Assets/LeanTween.meta b/Assets/LeanTween.meta new file mode 100644 index 0000000..72d6122 --- /dev/null +++ b/Assets/LeanTween.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 14d7fe06707e44d439f619e3b3b15386 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..04cdfe0 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 344646260043af4438ebc88e1102321c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Input/PlayerController.cs b/Assets/Scripts/Input/PlayerController.cs index 86b3d08..b5a2a66 100644 --- a/Assets/Scripts/Input/PlayerController.cs +++ b/Assets/Scripts/Input/PlayerController.cs @@ -22,13 +22,13 @@ public class PlayerController : MonoBehaviour public void UpdatePosition() { float HorseX, HorseZ; - HorseZ = Input.GetAxisRaw("Vertical"); - HorseX = Input.GetAxisRaw("Horizontal"); + HorseZ = receivedInput.y; + HorseX = receivedInput.x; float rotateTo = RotateObject(HorseX, HorseZ); - HorseZ = Input.GetAxis("Vertical") * Time.deltaTime * walkSpeed; - HorseX = Input.GetAxis("Horizontal") * Time.deltaTime * walkSpeed; + HorseZ *= Time.deltaTime * walkSpeed; + HorseX *= Time.deltaTime * walkSpeed; transform.Translate(HorseX, 0, HorseZ); @@ -71,7 +71,6 @@ public class PlayerController : MonoBehaviour } yield return new WaitForSeconds(0.5f); } -} // Update is called once per frame void Update()