Question by
AndrewBilotti · Feb 15, 2016 at 01:19 AM ·
touch
Game says that the touch phase is touchphase.began when there is no finger
Help! The script still runs what is supposed to be ran only when the touch phase is touch phase.began!
if (touch.phase == TouchPhase.Began) {
if (touch.phase == TouchPhase.Moved) {
if (touch.deltaPosition.y >= (touch.position.y + 1)) {
Debug.Log ("Swipe UP!");
jump ();
}
} else if (touch.phase != TouchPhase.Moved && (touch.phase != TouchPhase.Ended || touch.phase != TouchPhase.Canceled)) {
Shoot ();
}
}
Comment
Your answer