You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
964 B
37 lines
964 B
using UnityEngine; |
|
using UnityEngine.UI; |
|
|
|
public class SimpleProgressBar : MonoBehaviour |
|
{ |
|
Image m_progressImage = null; |
|
|
|
//----------------------------------------------------------------------------------------- |
|
void Start () |
|
{ |
|
|
|
} |
|
|
|
//----------------------------------------------------------------------------------------- |
|
public void Init() |
|
{ |
|
Transform progressImageTrans = transform.Find("progress"); |
|
if (progressImageTrans) |
|
{ |
|
m_progressImage = progressImageTrans.GetComponent<Image>(); |
|
} |
|
else |
|
CommonFunctions.myassert(false); |
|
} |
|
|
|
//----------------------------------------------------------------------------------------- |
|
public void SetProgress(float progress) |
|
{ |
|
m_progressImage.fillAmount = progress; |
|
} |
|
|
|
//----------------------------------------------------------------------------------------- |
|
void Update () |
|
{ |
|
|
|
} |
|
}
|
|
|