Esempio n. 1
0
        private void LateUpdate()
        {
            var target = Motor == null ? null : Motor.AskForTarget();

            if (Motor == null || target == null || target == Motor.gameObject)
            {
                _timer += Time.deltaTime;

                if (_timer >= HideDelay)
                {
                    _healthBar.Target = null;
                }
            }
            else
            {
                _timer            = 0;
                _healthBar.Target = target;
            }
        }