Example #1
0
 public bool AddCommand(string name, UnityAction cmd)
 {
     if (name == null)
     {
         return(false);
     }
     if (_commands.Find(c => c.name == name) != null)
     {
         return(false);
     }
     _commands.Add(DebugCommand.From(cmd, name));
     return(true);
 }
Example #2
0
 public bool AddCommand <T>(string name, UnityAction <T> cmd)
     where T : System.IConvertible
 {
     if (name == null)
     {
         return(false);
     }
     if (_commands.Find(c => c.name == name) != null)
     {
         return(false);
     }
     _commands.Add(DebugCommand.From <T>(cmd, name));
     return(true);
 }