Exemple #1
0
        public void Act()
        {
            if (_broken == false)
            {
                return;
            }

            _interactParticles.Play();

            _bar.gameObject.SetActive(true);
            _bar.UpdateValues(_fixingTimer, _fixingTime);

            _fixingTimer += Time.deltaTime;
            if (_fixingTimer >= _fixingTime)
            {
                Fix();
                Destroy(_bar.gameObject);
            }
        }
        public void Act()
        {
            if (!_audioSource.isPlaying)
            {
                _audioEvent?.Play(_audioSource);
            }

            _interactParticles.Play();

            ScaleWhenRepaired();

            _bar.gameObject.SetActive(true);
            _bar.UpdateValues(_fixingTimer, _fixingTime);

            _fixingTimer += Time.deltaTime;
            if (_fixingTimer >= _fixingTime)
            {
                Fix();
                Destroy(_bar.gameObject);
            }
        }