mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-26 18:08:27 -05:00
23 lines
566 B
C#
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;
|
|
// });
|
|
// }
|
|
// }
|
|
// }
|