public static void CoverOver() { GameObject coverObj = GameObject.FindGameObjectWithTag("LoadingController"); if (coverObj != null) { LoadingCoverKit lck = coverObj.GetComponent <LoadingCoverKit>(); if (lck != null) { lck.gameObject.transform.localPosition = new Vector3(1500f, 0f, -50f); //LoadingSliderKit.progress = 0f; lck.enabled = false; } } }
public static void ShowLoadingCover(string tipWord) { GameObject coverObj = GameObject.FindGameObjectWithTag("LoadingController"); if (coverObj != null) { LoadingCoverKit lck = coverObj.GetComponent <LoadingCoverKit>(); if (lck != null) { lck.gameObject.transform.localPosition = new Vector3(0f, 0f, -100f); if (LoadingSliderKit.progress > 0f) { lck.progress = 0.9f; } else { lck.progress = 0f; } //LoadingSliderKit.progress; lck.tipLabel.text = tipWord; lck.enabled = true; } } }
public override void OnLeave() { LoadingCoverKit.CoverOver(); }
public override void OnEnter() { LoadingCoverKit.ShowLoadingCover(RollingNotice.GetRandomNotice()); beginTime = Time.time; }