1using System.Collections;
2using System.Collections.Generic;
5using System.Diagnostics;
37 for (
int i = 0; i <
Elements.Length; i++)
39 random =
Random.Range(10.0f, 200.0f);
40 var previousScale =
Elements[i].GetComponent<RectTransform>().sizeDelta;
47 previousScale.y = Mathf.Lerp(previousScale.y, random, Time.deltaTime * 10);
48 Elements[i].GetComponent<RectTransform>().sizeDelta = previousScale;
53 private void OnDisable()
61 StartCoroutine(SetAlpha(0, 1f,
false));
62 StartCoroutine(Speaker(p));
69 StartCoroutine(SetAlpha(1f, 0,
true));
73 IEnumerator SetAlpha(
float startAlpha,
float endAlpha,
bool hide)
78 float duration = 0.5f;
79 var cggo =
blurImage.GetComponent<CanvasGroup>();
80 var blurgo =
blur.GetComponent<
Image>().material;
81 var imageAlpha =
blurImage2.GetComponent<
Image>().material.GetColor(
"_Color");
82 while (time <= duration)
84 time += Time.deltaTime;
85 cggo.alpha = Mathf.Lerp(startAlpha, endAlpha, time / duration);
86 blurgo.SetFloat(
"_BumpAmt", cggo.alpha * 10);
87 imageAlpha.a = cggo.alpha * 155;
97 IEnumerator Speaker(Process p)
101 if (!
Sound2.activeInHierarchy)
104 yield
return new WaitForSeconds(0.5f);
106 if (!
Sound3.activeInHierarchy)
109 yield
return new WaitForSeconds(0.5f);
111 if (!
Sound4.activeInHierarchy)
114 yield
return new WaitForSeconds(0.5f);
121 yield
return new WaitForSeconds(0.5f);
System.Drawing.Image Image
void showBlur(Process p, string text)
static BlurTheScene Instance