18 lines
462 B
C#
18 lines
462 B
C#
![]() |
using UnityEngine;
|
||
|
|
||
|
namespace Prefab
|
||
|
{
|
||
|
public class ProgressBarPrefab:MonoBehaviour
|
||
|
{
|
||
|
public GameObject _progress;
|
||
|
public float Progress
|
||
|
{
|
||
|
get => _progress.transform.localScale.x;
|
||
|
set
|
||
|
{
|
||
|
var x=Mathf.Clamp01(value);
|
||
|
_progress.transform.localScale = new Vector3(x, _progress.transform.localScale.y, _progress.transform.localScale.z);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|