public void OnPointerDown (PointerEventData data) { if (gameObject.name == "Left") { playerMove.SetMoveLeft (true); } else { playerMove.SetMoveLeft (false); } }
public void OnPointerDown(PointerEventData data) { if (gameObject.name == "Left") //When touching the left screen { playerMove.SetMoveLeft(true); } else //When touching the right { playerMove.SetMoveLeft(false); } }
//pressing button public void OnPointerDown(PointerEventData eventData) { if (gameObject.name == "Left") { playerMove.SetMoveLeft(true); } else { //right button down playerMove.SetMoveLeft(false); } }
public void OnPointerDown(PointerEventData data) { if (gameObject.name == "left") { player.SetMoveLeft(true); //Debug.Log ("left"); } else { player.SetMoveLeft(false); //Debug.Log("right"); } }
public void OnPointerDown(PointerEventData data) { if (gameObject.name == "Left") { playerMove.SetMoveLeft(true); //Debug.Log("Touched the left button"); } else { playerMove.SetMoveLeft(false); //Debug.Log("Touched the Right Button"); } }
public void OnPointerUp(PointerEventData data) { if (gameObject.name == "Left") { Debug.Log("Touching the left"); playerMove.SetMoveLeft(true); } else { Debug.Log("Touching the left"); playerMove.SetMoveLeft(false); } }