private void Update() { if (Input.GetKeyDown(KeyCode.B)) { StartCoroutine(FadeInOut.FadeImage(a, 3f, A1)); } }
private void Update() { if (Input.GetKeyDown(KeyCode.A)) { StartCoroutine(FadeInOut.FadeImage(image1, 5f, color1)); } else if (Input.GetKeyDown(KeyCode.B)) { StartCoroutine(FadeInOut.FadeImage(image2, 5f, color2)); } }
void Update() { if (Input.GetKeyDown(KeyCode.A)) { StartCoroutine(FadeInOut.FadeImage(red, 10F, a)); } if (Input.GetKeyDown(KeyCode.B)) { StartCoroutine(FadeInOut.FadeImage(blue, 10F, b)); } }
public virtual void FaderOn(bool state, float duration) { if (fader != null) { fader.gameObject.SetActive(true); if (state == true) { StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 1))); } else { StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 0))); } } }
public virtual void FaderOn(bool state, float duration) { if (fader != null) { fader.gameObject.SetActive(true); if (state) { StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 1f), GameManager.Instance.Paused)); } else { StartCoroutine(FadeInOut.FadeImage(fader, duration, new Color(0, 0, 0, 0f), GameManager.Instance.Paused)); } } }