From f360b98a13e190f58d509b4b2ec7e477b0082f18 Mon Sep 17 00:00:00 2001 From: Ali Sharoz Date: Thu, 28 Nov 2024 17:57:45 +0500 Subject: [PATCH] Vibrations On Enemy death and shoot --- Assets/3rd/D2D_Scripts/Gameplay/Health/Health.cs | 2 ++ Assets/Source/Scripts/SO/Soldiers/PistolMember.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Assets/3rd/D2D_Scripts/Gameplay/Health/Health.cs b/Assets/3rd/D2D_Scripts/Gameplay/Health/Health.cs index 95e7b975..b8000168 100644 --- a/Assets/3rd/D2D_Scripts/Gameplay/Health/Health.cs +++ b/Assets/3rd/D2D_Scripts/Gameplay/Health/Health.cs @@ -3,6 +3,7 @@ using System.Collections; using D2D.Core; using D2D.Utilities; using DG.Tweening; +using Lofelt.NiceVibrations; using UnityEngine; using static D2D.Utilities.CommonGameplayFacade; @@ -169,6 +170,7 @@ namespace D2D.Gameplay if(!_isPlayer) { _enemySpawn.EnemyDeathAudio.Play(); + HapticPatterns.PlayPreset(HapticPatterns.PresetType.MediumImpact); } if (_isGrayFadeout) { diff --git a/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs b/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs index 1a1f7ede..895209f9 100644 --- a/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs +++ b/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs @@ -1,5 +1,6 @@ using D2D; using D2D.Utilities; +using Lofelt.NiceVibrations; using UnityEngine; using static D2D.Utilities.CommonGameplayFacade; @@ -70,6 +71,8 @@ public class PistolMember : SquadMember { ShootSound.pitch = val; ShootSound.Play(); + + HapticPatterns.PlayPreset(HapticPatterns.PresetType.LightImpact); } }