unity-atoms/Examples/Assets/UniRx/UI/HealthBarUniRx.cs
Adam Ramberg 5d9f8dca71 WIP
2020-03-01 21:32:52 +01:00

23 lines
566 B
C#

// using UnityEngine;
// using UnityEngine.UI;
// using UniRx;
// namespace UnityAtoms.Examples
// {
// public class HealthBarUniRx : MonoBehaviour
// {
// [SerializeField]
// private IntConstant _maxHealth = null;
// [SerializeField]
// private IntVariable _health = null;
// void Awake()
// {
// _health.ObserveChange().Subscribe(health =>
// {
// GetComponent<Image>().fillAmount = 1.0f * health / _maxHealth.Value;
// });
// }
// }
// }