//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); }
//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); }