Hello I'm working on a game with random generation, a dungeon crawler of sorts. i need to be able to have an object that when instantiated, adds to the score(the goal is to find all of them as the dungeon is created around you)this is the script for the orb/cube.`
public Text score;
public int scores;
// Use this for initialization
void Start () {
scores ++ ;
score.text = scores.ToString();
}
public void Update()
{
score.text = scores.ToString();
}
public void OnMouseDown()
{
Destroy(gameObject);
scores--;
}
`