示例#1
0
 public static int Bxor(LuaArguments args)
 {
     return(args.Select(o => o.AsInt()).Aggregate((l, r) => l ^ r));
 }
示例#2
0
 // The following types will be automatically added without the need of providing them in Lua:
 //  CancellationToken - The token that was given in "engine.ExecuteAsync" or "func.CallAsync".
 //  LuaArguments      - All the arguments given by Lua.
 //  Engine            - The engine that called the method.
 public static void Notice(Engine engine, LuaArguments args)
 {
     Console.WriteLine($"The engine {engine} said: {string.Join(", ", args.Select(a => a.AsString()))}");
 }
示例#3
0
 private static LuaArguments print(LuaArguments args)
  {
      Console.WriteLine(string.Join("\t", args.Select(x => x.ToString()).ToArray()));
      return Lua.Return();
  }
示例#4
0
 public static string Char(LuaArguments args)
 {
     return(new string(args.Select(o => (char)o.AsNumber()).ToArray()));
 }