Interhaptics SDK for Unity
1.6
Loading...
Searching...
No Matches
Interhaptics
sdk_unity
Interhaptics
Runtime
Samples
EventHapticManagerMobile.cs
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Go Touch VR SAS. All rights reserved.
3
*
4
*/
5
6
using
Interhaptics.Utils
;
7
using
System.Collections.Generic;
8
using
UnityEngine;
9
10
namespace
Interhaptics.Samples
11
{
12
public
class
EventHapticManagerMobile
: MonoBehaviour
13
{
14
[SerializeField]
15
private
List<EventHapticSource> eventHapticSources;
16
17
public
void
StopPlayingEventHapticSources
()
18
{
19
foreach
(
EventHapticSource
eventHapticSource
in
eventHapticSources)
20
{
21
if
(eventHapticSource.
isPlaying
)
22
{
23
Core.HAR.StopEvent(eventHapticSource.
HapticMaterialId
);
24
if
(eventHapticSource.
playingCoroutine
!=
null
)
25
{
26
eventHapticSource.StopCoroutine(eventHapticSource.
playingCoroutine
);
27
}
28
eventHapticSource.playingCoroutine =
null
;
29
eventHapticSource.isPlaying =
false
;
30
break
;
31
}
32
}
33
}
34
}
35
}
Interhaptics.Internal.HapticSource.isPlaying
bool isPlaying
Definition
HapticSource.cs:54
Interhaptics.Internal.HapticSource.playingCoroutine
Coroutine playingCoroutine
Definition
HapticSource.cs:60
Interhaptics.Internal.HapticSource.HapticMaterialId
int HapticMaterialId
Definition
HapticSource.cs:66
Interhaptics.Samples.EventHapticManagerMobile
Definition
EventHapticManagerMobile.cs:13
Interhaptics.Samples.EventHapticManagerMobile.StopPlayingEventHapticSources
void StopPlayingEventHapticSources()
Definition
EventHapticManagerMobile.cs:17
Interhaptics.Utils.EventHapticSource
Haptic source that plays a haptic effect when triggered by an event. Plays the haptic effect on the s...
Definition
EventHapticSource.cs:20
Interhaptics.Samples
Definition
AudioControlGUI.cs:10
Interhaptics.Utils
Definition
ConditionalHideAttribute.cs:7
Generated by
1.11.0