Skip to content

Instantly share code, notes, and snippets.

@cmdr2
Created April 6, 2016 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmdr2/ce1ea4440a7273831bb290c0e52dc2e3 to your computer and use it in GitHub Desktop.
Save cmdr2/ce1ea4440a7273831bb290c0e52dc2e3 to your computer and use it in GitHub Desktop.
void Update() {
if (Input.touchCount > 0) {
foreach (Touch t in Input.touches) {
if (t.phase == TouchPhase.Moved) {
if (t.position.x < Screen.width * 0.5f && handType == HandType.HOUR_HAND) {
leftCube.SetActive(true);
rightCube.SetActive(false);
} else if (t.position.x > Screen.width * 0.5f && handType == HandType.MINUTE_HAND) {
leftCube.SetActive(false);
rightCube.SetActive(true);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment