private void TriggerCollisionWithObstacle(Collider2D collision) { ObjectPoolEvents.OnSpawnParticle(transform.position); HUDEvents.OnApplyNewScore(transform.position); ObjectPoolEvents.OnReturnObstacleToPool(collision.gameObject); ObjectPoolEvents.OnReturnBulletToPool(gameObject); }
private void DecreaseHealthCount() { _currentHealthCount--; if (_currentHealthCount >= 0) { HUDEvents.OnUpdateHealthHUD(_currentHealthCount); } else { PlayerEvents.OnPlayerDied(); } }
private void InitializePlayerHealth() { _currentHealthCount = _healthData.PlayerMaxHealth; HUDEvents.OnUpdateHealthHUD(_currentHealthCount); }