#Brackey's Typing Game Tutorial
1 messages · Page 1 of 1 (latest)
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class wordDisplay : MonoBehaviour
{
public Text text;
public AddScore score;
public void setWord(string word)
{
text.text = word;
}
public void removeLetter()
{
text.text = text.text.Remove(0, 1);
text.color = Color.red;
}
public void removeWord()
{
Destroy(gameObject);
//add +1 to score here
}
}
^this is my WordDisplay.cs
Have you tried google?
I made a ScoreManager script and referenced that inside the WordDisplay script but it cannot find the script because it's in a prefab