Пример #1
0
        public void Initialize(ResourceBarValue ResourceBarValue)
        {
            //Debug.Log($"{ResourceBarValue} is now being tracked");
            _resourceValue = ResourceBarValue;
            MyMaxValue     = _resourceValue.MaxValue;
            MyCurrentValue = _resourceValue.CurrentValue;

            valueText      = GetComponentInChildren <TMP_Text>(); //eliminates a race condition
            valueText.text = $"{MyCurrentValue}/{MyMaxValue}";
        }
Пример #2
0
 public void Initialize(ResourceBarValue ResourceBarValue)
 {
     _resourceValue = ResourceBarValue;
     MyMaxValue     = _resourceValue.MaxValue;
     MyCurrentValue = _resourceValue.CurrentValue;
 }