Example #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (!_isMessageDispleyd && other.gameObject.CompareTag("Player"))
     {
         _uiOutputController.DisplayCheckPointMessage(_message, _checkPointDisplayTime);
         _isMessageDispleyd = true;
     }
 }
Example #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player") && !_isActivated)
     {
         _uiOutputController.DisplayCheckPointMessage(_message, _messageDisplayTime);
         _boss.SetActive(true);
         _bossDoorAnimator.SetTrigger("Close");
         _isActivated = true;
     }
 }
Example #3
0
 private void PickUpItems()
 {
     foreach (var gameObject in _items)
     {
         if (gameObject.activeSelf && InCollectaeRange(gameObject))
         {
             Item item = gameObject.GetComponent <Item>();
             _collectedItems.Add(item);
             gameObject.SetActive(false);
             _uiOutputController.DisplayInventory(_collectedItems);
             if (item.ItemType == ItemTypes.Weapon)
             {
                 _uiOutputController.DisplayCheckPointMessage(_collectWeaponMessage, _messageDisplayTime);
             }
         }
     }
 }
Example #4
0
 private void _playerHealthController_OnDie()
 {
     _uiOutputController.DisplayCheckPointMessage("Вы проиграли!!!", _fadeDuration);
     _uiOutputController.ShowRestartRound();
     Time.timeScale = 0;
 }