mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 04:07:13 +08:00
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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|