Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VAUnity
Commits
1126396b
Commit
1126396b
authored
Dec 16, 2016
by
Maurice Tayeb Andreas
Browse files
Teleport on mute and UpdateAuraMode added
parent
aa4c734c
Changes
2
Hide whitespace changes
Inline
Side-by-side
VAUVRTKOnTeleportMute.cs
0 → 100644
View file @
1126396b
namespace
VRTK
{
using
UnityEngine
;
using
System.Collections
;
using
VA
;
public
class
VAUVRTKOnTeleportMute
:
MonoBehaviour
{
public
float
mutetime
=
0.2F
;
private
float
mutetimecounter
;
private
VANet
_VA
;
void
Start
()
{
_VA
=
VAUAdapter
.
VA
;
GetComponent
<
VRTK_BasicTeleport
>().
Teleporting
+=
VAUVRTKOnTeleportMute_Teleporting
;
GetComponent
<
VRTK_BasicTeleport
>().
Teleported
+=
VAUVRTKOnTeleportMute_Teleported
;
}
private
void
VAUVRTKOnTeleportMute_Teleported
(
object
sender
,
DestinationMarkerEventArgs
e
)
{
_VA
.
SetOutputMuted
(
false
);
}
private
void
VAUVRTKOnTeleportMute_Teleporting
(
object
sender
,
DestinationMarkerEventArgs
e
)
{
// mutetimecounter = mutetime;
_VA
.
SetOutputMuted
(
true
);
}
void
Update
()
{
//if (mutetimecounter > 0F)
// mutetimecounter -= Time.deltaTime;
//if (mutetimecounter < 0F)
// mutetimecounter = 0F;
//if (mutetimecounter == 0f)
// _VA.SetOutputMuted(false);
}
}
}
\ No newline at end of file
VAUVRTKUpdateAuraMode.cs
0 → 100644
View file @
1126396b
using
UnityEngine
;
using
System.Collections
;
using
VRTK
;
using
VA
;
public
class
VAUVRTKUpdateAuraMode
:
MonoBehaviour
{
private
VAUAuralizationMode
auralizationMode
=
new
VAUAuralizationMode
();
private
string
AuraMode
;
public
void
UpdateGridLayoutValue
(
int
selectedIndex
)
{
AuraMode
=
""
;
auralizationMode
=
FindObjectOfType
<
VAUAdapter
>().
gameObject
.
GetComponent
<
VAUAuralizationMode
>();
if
(
auralizationMode
==
null
)
Debug
.
Log
(
"Global AuralizationMode can't be set: No VAUAuralizationMode on VA-Object."
);
AuraMode
=
(
selectedIndex
==
0
)
?
"all"
:
""
;
AuraMode
=
(
selectedIndex
==
1
)
?
"default"
:
""
;
AuraMode
=
(
selectedIndex
==
2
)
?
"+DS"
:
"-DS"
;
AuraMode
=
(
selectedIndex
==
3
)
?
"+ER"
:
"-ER"
;
AuraMode
=
(
selectedIndex
==
4
)
?
"+DD"
:
"-DD"
;
AuraMode
=
(
selectedIndex
==
5
)
?
"+DIR"
:
"-DIR"
;
AuraMode
=
(
selectedIndex
==
6
)
?
"+AA"
:
"-AA"
;
AuraMode
=
(
selectedIndex
==
7
)
?
"+TV"
:
"-TV"
;
AuraMode
=
(
selectedIndex
==
8
)
?
"+SC"
:
"-SC"
;
AuraMode
=
(
selectedIndex
==
9
)
?
"+DIF"
:
"-DIF"
;
AuraMode
=
(
selectedIndex
==
10
)
?
"+NF"
:
"-NF"
;
AuraMode
=
(
selectedIndex
==
11
)
?
"+DP"
:
"-DP"
;
AuraMode
=
(
selectedIndex
==
12
)
?
"+SL"
:
"-SL"
;
auralizationMode
.
TriggerAuraStringChanged
(
AuraMode
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment