示例#1
0
 public CommandQueue Parallel(params CommandDelegate[] commands)
 => Sequence(Cmd.Parallel(commands));
示例#2
0
 /// <summary>
 /// Schedule a list of commands.
 /// </summary>
 /// <param name="commands"> The commands to be executed sequentially.</param>
 public void Schedule(params CommandDelegate[] commands)
 {
     _scheduler.Add(Cmd.Sequence(commands));
 }
示例#3
0
 public static CommandDelegate Log(string text)
 {
     return(Cmd.Do(() => Debug.Log(text)));
 }
示例#4
0
 public static CommandDelegate SendMessage(GameObject gm, string eventName, object obj = null,
                                           SendMessageOptions options = SendMessageOptions.DontRequireReceiver)
 {
     return(Cmd.Do(() => gm.SendMessage(eventName, obj, options)));
 }
示例#5
0
 public static CommandDelegate SetActive(GameObject gm, bool isActive)
 {
     return(Cmd.Do(() => gm.SetActive(isActive)));
 }
示例#6
0
 public static CommandDelegate Enable(MonoBehaviour behaviour, bool isEnabled = true)
 {
     return(Cmd.Do(() => behaviour.enabled = isEnabled));
 }
示例#7
0
 public static CommandDelegate LogException(Exception e)
 {
     return(Cmd.Do(() => Debug.LogException(e)));
 }