private void SetVideoTime(string key, float st, float et) { TimeDec td = new TimeDec(); td.keys = key; td.stime = st; td.etime = et; mTimeDec.Add(td); }
private void Update() { if (mLastTimeDec != null) { if (mLastTimeDec.etime < mVideoPlayer.time) { mDec.text = ""; mLastTimeDec = null; } } if (mLastTimeDec == null) { if (mTimeDec.Count > mCurTimeDec) { var tt = mTimeDec[mCurTimeDec]; if (tt.stime <= mVideoPlayer.time) { mDec.text = tt.keys; mCurTimeDec++; mLastTimeDec = tt; } } } if (!mSkiping) { if (Input.GetMouseButtonDown(0)) { mSkipBt.gameObject.SetActive(true); mShowTime = 3; } if (mSkipBt.gameObject.activeInHierarchy && (mShowTime -= Time.deltaTime) < 0) { mSkipBt.gameObject.SetActive(true); } } }