using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SpriteChange : MonoBehaviour { public Sprite[] spSec; public Image imgSec; public int iSec=0; int iMin=0; // Use this for initialization void Start () { imgSec.sprite = spSec[iSec]; } // Update is called once per frame void Update () { iSec = (iSec + 1) % 60; imgSec.sprite = spSec[iSec]; } }