Exemplo n.º 1
0
 void Start()
 {
     _shipCondition     = GetComponentInParent <ShipCondition>();
     _interactParticles = GetComponentInChildren <InteractParticles>();
     _createUIElement   = FindObjectOfType <CreateUIElement>();
     if (_createUIElement)
     {
         var go = _createUIElement.CreateElement(UIElement.ProgressBar, transform.position);
         _bar = go.GetComponent <FixProgressBar>();
         _bar.Init(0, _fixingTime, transform.position);
         _bar.gameObject.SetActive(false);
     }
 }
Exemplo n.º 2
0
        void Start()
        {
            _shipCondition     = GetComponentInParent <ShipCondition>();
            _interactParticles = GetComponentInChildren <InteractParticles>();
            _createUIElement   = FindObjectOfType <CreateUIElement>();
            var go = _createUIElement.CreateElement(UIElement.ProgressBar, transform.position);

            _bar = go.GetComponent <FixProgressBar>();
            _bar.Init(0, _fixingTime, transform.position);
            _bar.gameObject.SetActive(false);
            _audioSource = GetComponent <AudioSource>();
            _audioSource.outputAudioMixerGroup = _audioEvent.MixerGroup;
        }