/** * Setup the ScorePanelController. */ void Start() { // set the singleton if (mSingleton) { Debug.LogError("Two ScorePanelControllers in the scene"); } mSingleton = this; // start the timer update coroutine StartCoroutine(TimerUpdate()); // initialize scorebar variables initalScoreWidth = spyScore.rectTransform.sizeDelta.x; spyScore.rectTransform.sizeDelta = new Vector2(-1, spyScore.rectTransform.sizeDelta.y); guardScore.rectTransform.sizeDelta = new Vector2(-1, guardScore.rectTransform.sizeDelta.y); }