Beispiel #1
0
    public override void PlaySpherical()
    {
        movie.UnloadMovie();
        string url   = "file://" + path;
        Fader  fader = Sphere.GetComponent <Fader>();

        Debug.Log(url);
        StartCoroutine(LoadImageCo(url, image =>
        {
            fader.DoFade();
            Resources.UnloadUnusedAssets();
            Material tempMaterial          = Sphere.GetComponent <Renderer>().material;
            tempMaterial.mainTextureOffset = new Vector2(0, 0);
            tempMaterial.mainTextureScale  = new Vector2(1, 1);
            tempMaterial.mainTexture       = image;

            //sphereAnchorer.ResetRotation();



            VideoControls.SetActive(false);
            toggleButton.gameObject.SetActive(true);
            toggleButton.Play();
            Debug.Log("stuck");
        }));
    }
Beispiel #2
0
 void Unfade()
 {
     if (!fader.gameObject.activeInHierarchy)
     {
         fader.gameObject.SetActive(true);
     }
     fader.DoFade(0.0f, 0.2f, (finish) => { });
 }
 public void OnStartGamePressed()
 {
     Debug.Log("Game Start Pressed");
     OnButtonPressed();
     fader.DoFade(1.0f, 0.2f, (finish) =>
     {
         SceneManager.LoadScene("Main", LoadSceneMode.Single);
     }
                  );
 }
Beispiel #4
0
    public override void PlaySpherical()
    {
        Fader fader = Sphere.GetComponent <Fader>();

        fader.DoFade();

        movie._filename = path;
        movie.LoadMovie(true);
        VideoControls.SetActive(true);
        toggleButton.gameObject.SetActive(true);
        toggleButton.Play();
        sphereAnchorer.ResetRotation();
    }
 // Update is called once per frame
 void Update()
 {
     if (enableFlash)
     {
         Color color = renderer.color;
         if (color.a <= 0)
         {
             fader.ResetFader();
         }
         float targetOpacity = originalOpacity > 0 ? originalOpacity : 1;
         fader.DoFade(ref color.a, fadeSpeed, appearaceTime, targetOpacity);
         renderer.color = color;
     }
     else
     {
         Color color = renderer.color;
         color.a        = originalOpacity;
         renderer.color = color;
     }
 }