|
|
|
@ -167,9 +167,14 @@ namespace D2D.Gameplay
|
|
|
|
|
private void InitiateDeathSequence()
|
|
|
|
|
{
|
|
|
|
|
Died?.Invoke();
|
|
|
|
|
if(!_isPlayer)
|
|
|
|
|
if (!_isPlayer)
|
|
|
|
|
{
|
|
|
|
|
float pitch = UnityEngine.Random.Range(0.8f, 1.2f);
|
|
|
|
|
if (_enemySpawn.EnemyDeathAudio != null)
|
|
|
|
|
{
|
|
|
|
|
_enemySpawn.EnemyDeathAudio.pitch = pitch;
|
|
|
|
|
_enemySpawn.EnemyDeathAudio.Play();
|
|
|
|
|
}
|
|
|
|
|
HapticPatterns.PlayPreset(HapticPatterns.PresetType.MediumImpact);
|
|
|
|
|
}
|
|
|
|
|
if (_isGrayFadeout)
|
|
|
|
@ -231,7 +236,7 @@ namespace D2D.Gameplay
|
|
|
|
|
if (healPoints <= 0)
|
|
|
|
|
throw new Exception("Heal points should be positive!");
|
|
|
|
|
|
|
|
|
|
CurrentPoints = Math.Min(CurrentPoints+healPoints, _maxPoints);
|
|
|
|
|
CurrentPoints = Math.Min(CurrentPoints + healPoints, _maxPoints);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetMaxPoints(float newMaxPoints, bool needRefill = false)
|
|
|
|
|