using UnityEngine;
using System.Collections;
public class jump : MonoBehaviour {
public int jumpSpeed;
public GameObject player;
void OnMouseDown() {
Debug.Log ("Touched Screen");
player.rigidbody2D.AddForce(Vector3.up * jumpSpeed * Time.deltaTime);
}
}
I have done this, on the object the script is attached to, there is a BoxCollider2D spanning the whole screen.
It doesn’t work.