// Chromecast 按鈕事件
    public void ChromecastButton()
    {
        if (!IsChromecast)
        {
            IsChromecast  = true;
            HiddenStatus  = 4;
            HiddenCounter = 0;

            Navbar.gameObject.SetActive(false);
            Footer.gameObject.SetActive(false);

            #region 暫停播放
            MovieManger movieM = MoviePlane.GetComponent <MovieManger>();
            movieM.movie.Stop();
            movieM.soundSource.Stop();
            MoviePlane.GetComponent <RawImage>().color = Color.black;

            movieM.ResetTime();
            this.GetComponent <MovieTimeLineEvent>().enabled = true;
            #endregion

            // 任務二開始
            counter.UpgradeToNextLevel(1);
        }
    }
    void Update()
    {
        // 去更新 藍色 TimeLine 的長度
        BlueTimeLine.localScale = new Vector3(movieM.MoviePlayRatio(), 1, 1);

        for (int i = 0; i < EventTime.Length; i++)
        {
            if (!BlueDotBool[i] && movieM.GetMoviePlayTime() >= EventTime[i])
            {
                BlueDotBool[i]        = true;
                BlueDotList[i].sprite = blueDotImage;

                InfoBlockList[i].SetActive(true);
            }
            else if (!BlockBool[i] && movieM.GetMoviePlayTime() >= EventTime[i] + 4)
            {
                BlockBool[i] = true;

                BlueDotList[i].gameObject.SetActive(false);

                InfoBlockList[i].SetActive(false);
                InfoBlockDarkList[i].SetActive(true);
            }
        }

        if (Input.GetKeyDown(KeyCode.Z))
        {
            // 任務四開始
            counter.UpgradeToNextLevel(3);
            counter.SaveAllState();

            SceneManager.LoadSceneAsync(3);
        }
    }
Example #3
0
    public void TimeLineImageButtonEvent(int num)
    {
        BackgroundImage[num].SetActive(true);

        // 任務三開始 (龍被點開)
        if (num == 3)
        {
            counter.UpgradeToNextLevel(2);
        }
    }
Example #4
0
    void Update()
    {
        #region 進度欄的更新
        if (movie.isPlaying)
        {
            MoviePlayTime        += Time.deltaTime;
            BlueDot.localPosition = BlueDotLocation();
            FrontBar.localScale   = FrontBarRatio();
            timeLabel.text        = MovieTimeText();
        }
        else if (MoviePlayTime + MovieLoadingLength >= MovieLength)
        {
            // 任務四開始
            counter.SaveAllState();
            counter.UpgradeToNextLevel(3);

            // 換場景
            SceneManager.LoadSceneAsync(3);
        }
        #endregion
    }