Hey everyone,
I was following this tutorial:
so I have a hero who collect coins.
and now I really would like to make a score count and game over text - which I did, via UI - text, but now I need to make it work with a script - I tried a few thinks but sadly nothing did work.
Has someone an idea? Probably not an hard question, but I just started using unity.
Until now I made a script GameController and wrote this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GameController : MonoBehaviour {
public Text scoreText, gameOverText;
int playerScore = 0;
}
and linked my score and game over text to the game controller.