Tanoda
TriggerActionHelper.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
NaughtyAttributes;
4
using
UnityEngine
;
5
#if !UNITY_WEBGL
6
using
ViveHandTracking;
7
#endif
8
9
public
class
TriggerActionHelper
: MonoBehaviour
10
{
11
[ReadOnly]
12
[SerializeField]
13
private
TriggerAction
ta;
14
15
public
void
SetTAParent
(
TriggerAction
ta)
16
{
17
this.ta = ta;
18
}
19
20
private
void
OnTriggerEnter(Collider other)
21
{
23
//if (other.name.Contains("driver") || other.name.Contains("Just"))
24
//{
25
// return;
26
//}
27
//
28
//if (GameObject.Find("fake_csavarozas") || GameObject.Find("fake_csavarozas (1)"))
29
//{
30
// return;
31
//}
33
#if !UNITY_WEBGL
34
if
(!other.GetComponentInParent<
HackedHand
>())
35
{
36
return
;
37
}
38
39
//if (other.GetComponentInParent<ModelRenderer>()?.statusLed?.activeSelf != true)
40
//{
41
// return;
42
//}
43
#endif
44
if
(ta)
45
{
46
ta.
TriggerNow
();
47
}
48
}
49
50
[
Button
]
51
private
void
DoTriggerNow()
52
{
53
ta.
TriggerNow
();
54
}
55
}
Button
UnityEngine.UI.Button Button
Definition:
Pointer.cs:7
HackedHand
Definition:
HackedHand.cs:22
TriggerActionHelper
Definition:
TriggerActionHelper.cs:10
TriggerActionHelper.SetTAParent
void SetTAParent(TriggerAction ta)
Definition:
TriggerActionHelper.cs:15
TriggerAction
Definition:
TriggerAction.cs:14
TriggerAction.TriggerNow
void TriggerNow()
Definition:
TriggerAction.cs:265
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
TriggerActionHelper.cs
Generated by
1.9.3