コード例 #1
0
 private void TriggerCollisionWithObstacle(Collider2D collision)
 {
     ObjectPoolEvents.OnSpawnParticle(transform.position);
     HUDEvents.OnApplyNewScore(transform.position);
     ObjectPoolEvents.OnReturnObstacleToPool(collision.gameObject);
     ObjectPoolEvents.OnReturnBulletToPool(gameObject);
 }
コード例 #2
0
    private void DecreaseHealthCount()
    {
        _currentHealthCount--;

        if (_currentHealthCount >= 0)
        {
            HUDEvents.OnUpdateHealthHUD(_currentHealthCount);
        }
        else
        {
            PlayerEvents.OnPlayerDied();
        }
    }
コード例 #3
0
 private void InitializePlayerHealth()
 {
     _currentHealthCount = _healthData.PlayerMaxHealth;
     HUDEvents.OnUpdateHealthHUD(_currentHealthCount);
 }