private CLI.Result ExecuteByLine(CLI.Command cmd, int argFrom) { if (L == null) { L = new XLua.LuaEnv(); } return(LuaReturnToCLIResult(L.DoString(cmd.Raw))); }
private CLI.Result ExecuteWithFile(CLI.Command cmd, int argFrom) { var www = new WWW(FileServerDomain + cmd[0]); while (!www.isDone) { ; } if (L == null) { L = new XLua.LuaEnv(); } return(LuaReturnToCLIResult(L.DoString(www.text))); }
private CLI.Result ExecuteSingleton(CLI.Command cmd, int argsFrom) { switch (cmd[argsFrom]) { case "realtimeSinceStartup": return(CLI.Result.Success("now: " + Time.realtimeSinceStartup)); case "timescale": var newTimescale = float.Parse(cmd.Args[0]); Time.timeScale = newTimescale; return(CLI.Result.Success("set timescale: " + newTimescale)); default: return(CLI.Result.InvalidCmd(cmd)); } }
private CLI.Result ExecuteChannel3(CLI.Command cmd, int argsFrom) { return(CLI.Result.Success("[Ch3] " + cmd.Raw)); }