Hi I am currently making a score system for a game.
I have 2 scripts:
Movement & Score.
The Movement contains a public variable
public int score;
I want to get that score into my score script, but it can’t find the score:
public class Score : MonoBehaviour {
public int finalScore = 1;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
finalScore = GameObject.Find("Pacman").GetComponent<Movement>.;
guiText.text = "Score " + finalScore;
}
}
I get this error:
Assets/Scriptes/Score.cs(14,48): error CS0119: Expression denotes a method group', where a
variable’, value' or
type’ was expected