예제 #1
0
 private CLI.Result ExecuteByLine(CLI.Command cmd, int argFrom)
 {
     if (L == null)
     {
         L = new XLua.LuaEnv();
     }
     return(LuaReturnToCLIResult(L.DoString(cmd.Raw)));
 }
예제 #2
0
    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)));
    }
예제 #3
0
    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));
        }
    }
예제 #4
0
 private CLI.Result ExecuteChannel3(CLI.Command cmd, int argsFrom)
 {
     return(CLI.Result.Success("[Ch3] " + cmd.Raw));
 }