Tanoda
PromoHelper.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
UnityEngine
;
4
using
GILES
;
5
6
public
class
PromoHelper
: MonoBehaviour
7
{
8
private
bool
once =
true
;
9
10
public
AudioClip
Base
,
BaseInPlace
,
Csavar
,
Csavar2
,
Oszlop
,
OszlopInPlace
,
TopBack
;
11
12
public
void
PlaySound
(
int
index)
13
{
14
var asource = gameObject.DemandComponent<AudioSource>();
15
switch
(index)
16
{
17
case
0:
18
asource.clip =
Oszlop
;
19
break
;
20
case
1:
21
asource.clip =
OszlopInPlace
;
22
break
;
23
case
2:
24
asource.clip =
Base
;
25
break
;
26
case
3:
27
asource.clip =
BaseInPlace
;
28
break
;
29
case
4:
30
asource.clip =
Csavar
;
31
break
;
32
case
5:
33
asource.clip =
Csavar2
;
34
break
;
35
case
6:
36
asource.clip =
TopBack
;
37
break
;
38
}
39
asource.Play();
40
}
41
42
// Update is called once per frame
43
void
Update()
44
{
45
if
(once && !GameObject.Find(
"fake_csavarozas"
) && !GameObject.Find(
"fake_csavarozas (1)"
))
46
{
47
once =
false
;
48
GameObject.Find(
"Promo_second_floor"
).GetComponent<
ReferenceSaver
>().Reference.SetActive(
true
);
49
}
50
}
51
}
PromoHelper
Definition:
PromoHelper.cs:7
PromoHelper.Oszlop
AudioClip Oszlop
Definition:
PromoHelper.cs:10
PromoHelper.TopBack
AudioClip TopBack
Definition:
PromoHelper.cs:10
PromoHelper.Base
AudioClip Base
Definition:
PromoHelper.cs:10
PromoHelper.OszlopInPlace
AudioClip OszlopInPlace
Definition:
PromoHelper.cs:10
PromoHelper.BaseInPlace
AudioClip BaseInPlace
Definition:
PromoHelper.cs:10
PromoHelper.Csavar
AudioClip Csavar
Definition:
PromoHelper.cs:10
PromoHelper.PlaySound
void PlaySound(int index)
Definition:
PromoHelper.cs:12
PromoHelper.Csavar2
AudioClip Csavar2
Definition:
PromoHelper.cs:10
ReferenceSaver
Definition:
ReferenceSaver.cs:6
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
PromoHelper.cs
Generated by
1.9.3