// Jimmy Vegas Unity Tutorials // These scripts are for score generating using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ScoreCubeMonitor : MonoBehaviour { public static int scoreNum; public GameObject scoreDisp; void Update() { scoreDisp.GetComponent().text = "SCORE: " + scoreNum; } } using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScoreAdder : MonoBehaviour { void OnTriggerEnter(Collider other) { if(other.tag == "PlayerObject") { ScoreCubeMonitor.scoreNum += 10; } } }