void Start() { loadBarValue = 0; timeStep = 0; x = 0; manager = transform.parent.transform.parent.GetComponent <LoadScreenManager>(); maxXStep = 0.1f; minXStep = 0.02f; maxTimeStep = 0.1f; minTimeStep = 0.02f; initialLoadStep = Random.Range(10, 20); //the value up to which the load happens using loadVal++ loadedAtVal = Random.Range(95, 99); //value after which the level is considered loaded }
private void Awake() { instance = this; }