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

public class NextBallScript : MonoBehaviour
{
    private GameObject BallFallObj;

    [SerializeField]
    private Sprite[] texture;

    private SpriteRenderer renderer;
    // Start is called before the first frame update
    void Start()
    {
        BallFallObj = GameObject.Find("Circle_Fall");

        renderer = GetComponent<SpriteRenderer>();

        renderer.sprite = texture[BallFallObj.GetComponent<BallFallScript>().NextBall - 1];
    }

    // Update is called once per frame
    void Update()
    {
        renderer.sprite = texture[BallFallObj.GetComponent<BallFallScript>().NextBall - 1];
    }
}
