using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LoadImage : MonoBehaviour {
[SerializeField] private Image newImage;
[SerializeField] Image[] nextImage;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
GetNextImage();
}
private Image GetNextImage()
{
if (Input.GetKeyDown(KeyCode.RightArrow))
{
for (int i = 0; i < nextImage.Length; i++)
{
newImage = nextImage[i];
newImage.enabled = true;
}
}
return newImage;
}
}