Hi,
I made this script, but the game doesn t restart if the Player touched the Enemy on my android device, but in the unity player it restards (if i click on play in unity) Can me help anyone please. I put this script on the player for the 2d side scroller and my enemy has a rigid body.
var Live : float = 10;
var mySpeed : float = 7.5;
function Start () {
}
function Update () {
transform.Translate(Vector3.right * Time.deltaTime * mySpeed);
}
function OnCollisionEnter (other : Collision)
{
if(other.gameObject.tag == “Enemy”)
{
Application.LoadLevel (0);
}
}