Hey, Im making a game where when you tap the objects (which are Randomly Generated ) that fall down the screen, a point is added, when the Prefab is cloned the 'Score’is resets to 0… Any help? heres the Score script added to my Prefab.
using UnityEngine;
using System.Collections;
public class Score : MonoBehaviour {
public Transform clicks;
public GUIText score;
public bool clicked = false;
public int click = 0;
public void Start (){
}
public void Update (){
score.text = "Pingas Popped: " + click;
if (click == 250)
Application.LoadLevel("Superman");
}
void OnMouseDown (){
click += 1;
}
}