예제 #1
0
 public void OnNotify(Playable origin, INotification notification)
 {
     if (director == null)
     {
         Awake();
     }
     if (notification is JumpSignalEmmiter)
     {
         JumpSignalEmmiter signal = notification as JumpSignalEmmiter;
         director.time = signal.jumpTime;
     }
     else if (notification is SlowSignalEmitter)
     {
         SlowSignalEmitter signal = notification as SlowSignalEmitter;
         director.playableGraph.GetRootPlayable(0).SetSpeed(signal.slowRate);
     }
     else if (notification is ActiveSignalEmmiter)
     {
         ActiveSignalEmmiter signal = notification as ActiveSignalEmmiter;
         TrackAsset          track  = TimelineUtil.GetRootTrack(signal);
         Transform           tf     = ExternalHelp.FetchAttachOfTrack(director, track);
         if (tf)
         {
             tf.gameObject.SetActive(signal.Active);
         }
     }
 }
예제 #2
0
 public void OnNotify(Playable origin, INotification notification, object context)
 {
     if (notification is JumpSignalEmmiter)
     {
         JumpSignalEmmiter signal = notification as JumpSignalEmmiter;
         director.time = signal.jumpTime;
     }
     else if (notification is SlowSignalEmitter)
     {
         SlowSignalEmitter signal = notification as SlowSignalEmitter;
         director.playableGraph.GetRootPlayable(0).SetSpeed(signal.slowRate);
     }
 }