This commit is contained in:
esteb
2023-01-13 16:52:55 +01:00
parent 1c675b3bc8
commit 9b77de958c
235 changed files with 42300 additions and 118 deletions

View File

@@ -5,8 +5,8 @@ using UnityEngine.UI;
public class SwipeScript : MonoBehaviour
{
public Image imageText;
public List<Sprite> lengths;
public Text textSteps;
public List<Text> lengths;
public int numberImage;
public int lengthTexts;
@@ -15,7 +15,7 @@ public class SwipeScript : MonoBehaviour
private Vector2 startTouchPosition;
private Vector2 endTouchPosition;
private Vector2 endTouchPosition;
// Start is called before the first frame update
void Start()
@@ -25,7 +25,7 @@ public class SwipeScript : MonoBehaviour
arrowLeft.gameObject.SetActive(false);
btnLeft.onClick.AddListener(PreviousText);
btnRight.onClick.AddListener(NextText);
imageText.sprite = lengths[0];
textSteps.text = lengths[0].text;
}
// Update is called once per frame
@@ -57,7 +57,7 @@ public class SwipeScript : MonoBehaviour
if(numberImage != 0){
arrowLeft.gameObject.SetActive(true);
}
imageText.sprite = lengths[numberImage];
textSteps.text = lengths[numberImage].text;
}
}
@@ -72,7 +72,7 @@ public class SwipeScript : MonoBehaviour
if(numberImage != lengthTexts){
arrowRight.gameObject.SetActive(true);
}
imageText.sprite = lengths[numberImage];
textSteps.text = lengths[numberImage].text;
}
}
}