void Awake() { instance = this; //Force creation off an resultsholder object ResultsHolder.instance(); }
private void CountTime() { time -= 0.01f; // Game over if (time <= 0f) { // Fill the object with important data and change scene ResultsHolder.instance().score = score; ResultsHolder.instance().treesDestroyed = treesDestroyed; ResultsHolder.instance().trunksDestroyed = trunksDestroyed; sceneController.LoadResuls(); } else { VisualController.instance.UpdateTimeValue(time); } }
void Awake() { holder = ResultsHolder.instance(); }