Created
April 6, 2016 10:19
-
-
Save cmdr2/ce1ea4440a7273831bb290c0e52dc2e3 to your computer and use it in GitHub Desktop.
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
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