예제 #1
0
 //insert the action NOW.
 // will interrupt current action. current action will be played after this action inserted.
 public Vignette InsertActionFirst(SamAction action, bool interrupt = true)
 {
     if (interrupt && CurrentAction != null)
     {
         CurrentAction.Interrupt();
     }
     actionList.AddFirst(action);
     RestartCurrentAction();
     return(this);
 }
예제 #2
0
 //warning, it will insert all repeats
 //if you have a vignette with repeat(5), it will insert it 5 times.
 public Vignette InsertVignetteFirst(Vignette v, bool interrupt = true)
 {
     if (interrupt && CurrentAction != null)
     {
         CurrentAction.Interrupt();
     }
     InsertActionFirst(new WaitForAction(() => { return(v.IsFinished); }));
     RestartCurrentAction();
     if (!SamCinemaManager.main.IsRunning(v))
     {
         SamCinemaManager.main.AddVignette(v);
     }
     return(this);
 }