Files
JJBB/Assets/Project/Script/GUI/Base/UIBGImageRadom.cs

19 lines
411 B
C#
Raw Normal View History

2024-08-23 15:49:34 +08:00
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
public class UIBGImageRadom : UIBGImageChange
{
public List<string> _RandomPathes;
protected override void InitImg()
{
if (_RandomPathes.Count == 0)
return;
int randomIdx = Random.Range(0, _RandomPathes.Count);
ChangeRes(_RandomPathes[randomIdx]);
}
}