-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1656912
commit 12bffa5
Showing
7 changed files
with
276 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
// This class is used to manage the controller of your VR equipment | ||
|
||
|
||
public class Controller : MonoBehaviour | ||
{ | ||
private OVRInput.Controller LController = OVRInput.Controller.LTouch; | ||
private OVRInput.Controller RController = OVRInput.Controller.RTouch; | ||
// raise exception if Quad is not found | ||
public GameObject Quad; | ||
// Start is called before the first frame update | ||
void GetIncreaseButtonPressed() | ||
{ | ||
if (OVRInput.Get(OVRInput.Button.One, LController)) | ||
{ | ||
Debug.Log(" ===== Button One is pressed ====="); | ||
// increase the ratio of the pattern. Call IncreasePatternRatio() in ouchi.cs | ||
Quad.GetComponent<ouchi>().IncreasePatternRatio(); | ||
} | ||
} | ||
|
||
void GetDecreaseButtonPressed() | ||
{ | ||
if (OVRInput.Get(OVRInput.Button.Two, LController)) | ||
{ | ||
Debug.Log(" ===== Button Two is pressed ====="); | ||
// decrease the ratio of the pattern. Call DecreasePatternRatio() in ouchi.cs | ||
Quad.GetComponent<ouchi>().DecreasePatternRatio(); | ||
} | ||
} | ||
|
||
|
||
void Start() | ||
{ | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
GetIncreaseButtonPressed(); | ||
GetDecreaseButtonPressed(); | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.