From 8cea51f47fd22afec7b4c77e2ae031fbda2dfa10 Mon Sep 17 00:00:00 2001 From: esteb Date: Thu, 12 Jan 2023 10:01:44 +0100 Subject: [PATCH] swipe --- Assets/Scenes/SceneUnity.unity | 4 ++-- Assets/Scripts/SwipeScript.cs | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Assets/Scenes/SceneUnity.unity b/Assets/Scenes/SceneUnity.unity index 062017b..6cb9f80 100644 --- a/Assets/Scenes/SceneUnity.unity +++ b/Assets/Scenes/SceneUnity.unity @@ -655,8 +655,8 @@ MonoBehaviour: - {fileID: 21300000, guid: 16a85829eb6fea243b045f6d00d2e5a3, type: 3} numberImage: 0 lengthTexts: 3 - arrowLeft: {fileID: 1856408476} - arrowRight: {fileID: 1728270320} + arrowLeft: {fileID: 1856408478} + arrowRight: {fileID: 1728270322} --- !u!1 &1248988450 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/SwipeScript.cs b/Assets/Scripts/SwipeScript.cs index 9f31fd3..223d0ed 100644 --- a/Assets/Scripts/SwipeScript.cs +++ b/Assets/Scripts/SwipeScript.cs @@ -10,8 +10,8 @@ public class SwipeScript : MonoBehaviour public int numberImage; public int lengthTexts; - public GameObject arrowLeft; - public GameObject arrowRight; + public Button arrowLeft; + public Button arrowRight; private Vector2 startTouchPosition; @@ -20,7 +20,10 @@ public class SwipeScript : MonoBehaviour // Start is called before the first frame update void Start() { - + Button btnLeft = arrowLeft.GetComponent