Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Setup Vector class
- LuaValue vectorClass = CoerceJavaToLua.coerce(Vector3Lua.class);
- globals.set("Vector3", vectorClass);
- // Bind .new() to constructor function
- LuaTable t = new LuaTable();
- t.set("__add", new TwoArgFunction() {
- public LuaValue call(LuaValue x, LuaValue y) {
- System.out.println("TEST1: " + x);
- System.out.println("TEST2: " + y);
- return x;
- }
- });
- t.set("__index", t);
- vectorClass.setmetatable(t);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement