using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SimpleNextItemLoader : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }
    public List<GameObject> listOfObj = new List<GameObject>();
    int currentIndex;

    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            listOfObj[currentIndex].gameObject.SetActive(false);
            currentIndex++;
            if (currentIndex >= listOfObj.Count)
            {
                currentIndex = 0;

            }
            listOfObj[currentIndex].gameObject.SetActive(true);
        }
    }
}
