Commit 1126396b authored by Maurice Tayeb Andreas's avatar Maurice Tayeb Andreas

Teleport on mute and UpdateAuraMode added

parent aa4c734c
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
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);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment