Tanoda
DelayedDestroy.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
UnityEngine
;
4
5
public
class
DelayedDestroy
: MonoBehaviour
6
{
7
public
bool
DeactOnly
=
false
;
8
public
float
delay
;
9
public
static
GameObject
EpilepsyFixer
;
10
11
IEnumerator Start()
12
{
13
EpilepsyFixer
= gameObject;
14
yield
return
new
WaitForSeconds(
delay
);
15
if
(
DeactOnly
)
16
{
17
gameObject.SetActive(
false
);
18
yield
break
;
19
}
20
Destroy(gameObject);
21
}
22
23
public
void
DestroyNow
()
24
{
25
Destroy(gameObject);
26
}
27
}
DelayedDestroy
Definition:
DelayedDestroy.cs:6
DelayedDestroy.delay
float delay
Definition:
DelayedDestroy.cs:8
DelayedDestroy.DeactOnly
bool DeactOnly
Definition:
DelayedDestroy.cs:7
DelayedDestroy.DestroyNow
void DestroyNow()
Definition:
DelayedDestroy.cs:23
DelayedDestroy.EpilepsyFixer
static GameObject EpilepsyFixer
Definition:
DelayedDestroy.cs:9
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
DelayedDestroy.cs
Generated by
1.9.3