private void OnTriggerEnter2D(Collider2D other) { if (LevelManager.InstancedPlayer == null) { return; } if (other.gameObject != LevelManager.InstancedPlayer.gameObject) { return; } PlayersAccount.DepositToSave(); GuiEvent.UpdateNavCircleResources.Invoke(); }
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); }