Beispiel #1
0
 public void TriggerSeek()
 {
     if (seekType != SeekType.None)
     {
         SeekEvent?.Invoke(seekType, start, rate);
     }
     else
     {
         throw new InvalidOperationException("You should call Seek before trying to trigger it");
     }
 }
 private void RaiseSeekEvent(long frame)
 {
     if (NetworkServer.active)
     {
         var seekEvent = new SeekEvent()
         {
             frame = frame
         };
         NetworkServer.SendToAll(seekEvent);
         OnSeekEvent(seekEvent);
     }
     else
     {
         Debug.LogError("Mirror: Cannot send event if not server");
     }
 }
 public void OnSeekEvent(SeekEvent seekEvent)
 {
     InvokeSeek(seekEvent.frame);
 }
 public void Seek(SeekEvent e)
 {
     if (mainCamPlayerVM.Opened) {
         mainCamPlayerVM.Seek (e.Time, e.Accurate, e.Synchronous, e.Throttled);
     }
     if (secCamPlayerVM.Opened) {
         secCamPlayerVM.Seek (e.Time, e.Accurate, e.Synchronous, e.Throttled);
     }
 }
Beispiel #5
0
 public void Seek(SeekType seekType, Time start = null, float rate = 1)
 {
     SeekEvent?.Invoke(seekType, start, rate);
 }