Skip to content

Commit

Permalink
partymode switch
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-ninja committed May 15, 2020
1 parent 031126b commit 55297de
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 249 deletions.
3 changes: 2 additions & 1 deletion Assets/Scripts/PartyModeSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public class PartyModeSwitch : MonoBehaviour, IMenu
// Update is called once per frame
void Update ()
{
if (linearMapping.value < .5)
linearMapping.value = myHandle.transform.localPosition.x;
if (linearMapping.value < 0)
{
EnablePartyMode();
}
Expand Down
36 changes: 2 additions & 34 deletions Assets/Scripts/ResetButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,9 @@ void Start () {

}

void OnCollisionEnter(Collision other)
void OnTriggerEnter()
{
if (other.transform != transform && other.transform.GetComponent<Hand>())
{
Debug.Log("colliding with a hand" + other.transform.name);
}
}

private void OnHandHoverEnd(Hand hand)
{
Debug.Log(hand.transform.name);
}

// private void OnHandHoverBegin(Hand hand)
// {
// Debug.Log(hand.transform.name);
// Debug.Log(transform.name);
// }

// private IEnumerator HandHoverUpdate(Hand hand)
// {
// if (hand.GetThumbpadButtonDown() || ((hand.controller != null) && hand.controller.GetPressDown(Valve.VR.EVRButtonId.k_EButton_Grip)))
// {
// partyModeSwitch.IncrementValue();
// yield return null;
// partyModeSwitch.DecrementValue();
// }
// }

private void HandHoverUpdate(Hand hand)
{
if (hand.GetThumbpadButtonDown() || ((hand.controller != null) && hand.controller.GetPressDown(Valve.VR.EVRButtonId.k_EButton_Grip)))
{
ResetPartyMode();
}
ResetPartyMode();
}

/// <summary>
Expand Down
Loading

0 comments on commit 55297de

Please sign in to comment.