Advertisement
Guest User

feuhfu

a guest
Jun 17th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1.         public void FadingStart()
  2.         {
  3.             //currentColor = new Color(0, 0, 0, 0);
  4.             deltaColor = new Color(1, 1, 1, 3f);
  5.             targetColor = new Color(1, 1, 1, 1);
  6.             //SteamVR_Fade.View(targetColor, 2);
  7.             //currentColor = new Color(0, 0, 0, 1);
  8.             StartCoroutine(Fader());
  9.         }
  10.         //Maybe flip the fading part onto the IEnumerator if its randomly choosing to read one thing first
  11.         IEnumerator Fader()
  12.         {
  13.             yield return new WaitForSecondsRealtime(1f);
  14.             //FindObjectOfType<WorldChanger>().changeLevel();
  15.             FadingEnd();
  16.         }
  17.  
  18.         //Maybe flip the fading part onto the IEnumerator if its randomly choosing to read one thing first
  19.         public void FadingEnd()
  20.         {
  21.             deltaColor = new Color(0, 0, 0, 1);
  22.             //currentColor = new Color(0, 0, 0, 1);
  23.             targetColor = new Color(0, 0, 0, 0);
  24.             Start(targetColor, 1);
  25.             //SteamVR_Fade.View(targetColor, 1);
  26.  
  27.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement