Add project files.

This commit is contained in:
2022-09-30 17:32:21 +08:00
parent df69e65c88
commit e8e36b83bd
561 changed files with 40626 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using UnityEngine;
using UnityEngine.UI;
namespace Cryville.Common.Unity.UI {
public class ProgressBar : Slider {
[SerializeField][Range(0f, 1f)]
float m_smooth = 0;
public float Smooth {
get { return m_smooth; }
set { m_smooth = value; }
}
[SerializeField]
float m_targetValue;
public override float value {
get { return base.value; }
set { m_targetValue = value; }
}
#pragma warning disable IDE0051
protected override void Update() {
base.value = (base.value - m_targetValue) * m_smooth + m_targetValue;
base.Update();
}
#pragma warning restore IDE0051
}
}