private void Awake() { _bar = GetComponent <Bar>(); _indicationEffect = new LowLevelIndicatorEffect(this); _playerFuel.ValueChanged += OnValueChanged; _playerMaxFuel.ValueChanged += OnValueChanged; OnValueChanged(_playerFuel, _playerFuel); }
private void OnDestroy() { _indicationEffect = null; _playerHull.ValueChanged -= OnValueChanged; _playerMaxHull.ValueChanged -= OnValueChanged; }