ui
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user