1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using UnityEngine.UI;
- using XRTool.Util;
- public class AVideoSlide : PointerHandler
- {
- public AVProVideoPlayer aVdieoPlayer;
- public Slider slider;
- public static bool isDown = false;
-
- void Start()
- {
- }
-
- void Update()
- {
-
-
-
-
- }
- void sliderChanged(float per)
- {
- if (slider && aVdieoPlayer)
- {
- aVdieoPlayer.SetSeek( per);
-
-
- }
- }
- public override void OnPointerDown(PointerEventData eventData)
- {
- base.OnPointerDown(eventData);
- aVdieoPlayer.Pause();
- isDown = true;
- }
- public override void OnPointerUp(PointerEventData eventData)
- {
- base.OnPointerUp(eventData);
- sliderChanged(slider.value);
- TimerMgr.Instance.CreateTimer(()=> {
- aVdieoPlayer.Play();
- },0.2f);
- isDown = false;
- }
-
- }
|