add project files

This commit is contained in:
Boris Nikolaev
2026-08-14 01:58:31 +03:00
parent 9134cad79b
commit 5f1e94b653
4399 changed files with 12286903 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
using UnityEngine;
using OHM.UnityToolkit.UI;
using UnityEngine.Serialization;
public class PlayerGauge : CoreBehaviour
{
[SerializeField]
[FormerlySerializedAs("progressionGauge")]
private UIIncrementableGauge _progressionGauge;
[SerializeField]
[FormerlySerializedAs("statusTxt")]
private SizePrefabUI _statusTxt;
[SerializeField]
[FormerlySerializedAs("animGauge")]
private Animator _animGauge;
public void UpdateGauge(int v, bool force = false)
{
float value = (float)v / (float)base.CoreDef.player.maxValueRich;
if (force)
{
_progressionGauge.QuickResetToLevel(0, value, force: true);
}
else
{
_progressionGauge.SetTargetValue(value, 0);
}
}
public void ChangeStatus(string locKey, Color color)
{
_statusTxt.SetText(locKey, color);
_progressionGauge.changeGaugeColor(color);
}
public void ActiveGauge(bool active)
{
base.gameObject.SetActive(active);
}
public void ActiveDanger(bool active)
{
_animGauge.SetBool("Danger", active);
}
public void ActiveMax(bool active)
{
_animGauge.SetBool("Max", active);
}
}