private void Awake() { DontDestroyOnLoad(this); if (scoreStatic == null) { scoreStatic = this; } else { Destroy(gameObject); } }
void Start() { myText = gameObject.GetComponent <Text>(); scoreHolderScript = GameObject.Find("Scoreholder").GetComponent <scoreHolder>(); if (scoreHolderScript.score == 0) { myText.text = ("Stop trying to break the game. You got 0 points. It's a draw."); } else if (scoreHolderScript.score > 0 && scoreHolderScript.score != 69) { myText.text = positiveText[Random.Range(0, positiveText.Count)]; } else if (scoreHolderScript.score == 69) { myText.text = ("Nice"); } else { myText.text = negativeText[Random.Range(0, negativeText.Count)]; } }
void Start() { theAllSeeingScoreHolder = GameObject.Find("Scoreholder").GetComponent <scoreHolder>(); }
void Start() { myScoreHolder = GameObject.Find("Scoreholder").GetComponent <scoreHolder>(); }