Пример #1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (LevelManager.InstancedPlayer == null)
     {
         return;
     }
     if (other.gameObject != LevelManager.InstancedPlayer.gameObject)
     {
         return;
     }
     PlayersAccount.DepositToSave();
     GuiEvent.UpdateNavCircleResources.Invoke();
 }
Пример #2
0
        private void OnTriggerEnter2D(Collider2D other)
        {
            if (LevelManager.InstancedPlayer == null)
            {
                return;
            }
            if (other.gameObject != LevelManager.InstancedPlayer.gameObject)
            {
                return;
            }
            PlayersAccount.DepositToSave();
            GuiEvent.UpdateNavCircleResources.Invoke();

            _playerHitPointsDifference = ReadPlayerHitPointsDifference();
            _creditsForRepair          = _playerHitPointsDifference * _repairTax;
            UpdateCreditsUi(_creditsForRepair);
        }