Tanoda
HandSwitcher.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections;
3
using
System.Collections.Generic;
4
using
UnityEngine
;
5
using
UnityEngine
.
Events
;
6
7
public
class
HandSwitcher
: MonoBehaviour
8
{
9
public
static
HandSwitcher
instance
;
10
11
private
void
Awake()
12
{
13
instance
=
this
;
14
}
15
16
public
UnityEvent
OnDefault
,
OnSkeleton
,
OnV1
,
OnV2
,
OnV3
;
17
18
internal
void
HandSwitcher_Triggered(
object
sender, Collider e)
19
{
20
if
(sender is
TriggerRemoteEvent
tre)
21
{
22
if
(tre.name ==
"Default"
)
23
{
24
OnDefault
.Invoke();
25
}
26
else
if
(tre.name ==
"Skeleton"
)
27
{
28
OnSkeleton
.Invoke();
29
}
30
else
if
(tre.name ==
"V1"
)
31
{
32
OnV1
.Invoke();
33
}
34
else
if
(tre.name ==
"V2"
)
35
{
36
OnV2
.Invoke();
37
}
38
else
if
(tre.name ==
"V3"
)
39
{
40
OnV3
.Invoke();
41
}
42
}
43
}
44
}
HandSwitcher
Definition:
HandSwitcher.cs:8
HandSwitcher.OnV2
UnityEvent OnV2
Definition:
HandSwitcher.cs:16
HandSwitcher.OnDefault
UnityEvent OnDefault
Definition:
HandSwitcher.cs:16
HandSwitcher.OnSkeleton
UnityEvent OnSkeleton
Definition:
HandSwitcher.cs:16
HandSwitcher.OnV3
UnityEvent OnV3
Definition:
HandSwitcher.cs:16
HandSwitcher.instance
static HandSwitcher instance
Definition:
HandSwitcher.cs:9
HandSwitcher.OnV1
UnityEvent OnV1
Definition:
HandSwitcher.cs:16
TriggerRemoteEvent
Definition:
TriggerRemoteEvent.cs:6
UnityEngine.Events
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
TestScripts
HandSwitcher.cs
Generated by
1.9.3