Tanoda
SeegerHelper.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections;
3
using
System.Collections.Generic;
4
using
GILES
;
5
using
UnityEngine
;
6
7
public
class
SeegerHelper
: MonoBehaviour
8
{
9
public
bool
HasRing
=
false
;
10
public
GameObject
seegerRing
;
11
public
static
SeegerHelper
instance
;
12
13
private
void
Awake()
14
{
15
if
(!
instance
)
16
instance
=
this
;
17
else
18
Destroy(
this
);
19
}
20
21
public
bool
Trigger
()
22
{
23
if
(
HasRing
)
24
{
25
HasRing
=
false
;
26
seegerRing
?.SetActive(
false
);
27
return
true
;
28
}
29
30
return
false
;
31
}
32
33
void
OnTriggerEnter(Collider other)
34
{
35
if
(
HasRing
)
36
{
37
return
;
38
}
39
try
40
{
41
#if !UNITY_WEBGL
42
if
(other.name.Contains(
"seeger"
) && !other.name.Contains(
"seeger_plier"
))
43
{
44
var tcd = other.gameObject.GetComponentInParent<
ThrowableCanDisable
>();
45
if
(tcd)
46
{
47
tcd.
ForceDrop
();
48
Destroy(tcd.gameObject);
49
HasRing
=
true
;
50
seegerRing
?.SetActive(
true
);
51
}
52
}
53
#endif
54
}
55
catch
(Exception)
56
{
57
// ignored
58
}
59
}
60
}
SeegerHelper
Definition:
SeegerHelper.cs:8
SeegerHelper.instance
static SeegerHelper instance
Definition:
SeegerHelper.cs:11
SeegerHelper.seegerRing
GameObject seegerRing
Definition:
SeegerHelper.cs:10
SeegerHelper.HasRing
bool HasRing
Definition:
SeegerHelper.cs:9
SeegerHelper.Trigger
bool Trigger()
Definition:
SeegerHelper.cs:21
ThrowableCanDisable
Definition:
ThrowableCanDisable.cs:19
ThrowableCanDisable.ForceDrop
void ForceDrop()
Definition:
ThrowableCanDisable.cs:317
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
SeegerHelper.cs
Generated by
1.9.3