static int Set(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(GizmoPlane))) { GizmoPlane obj = (GizmoPlane)ToLua.ToObject(L, 1); obj.Set(); return(0); } else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(GizmoPlane), typeof(UnityEngine.Vector3[]), typeof(UnityEngine.Vector2[]), typeof(int[]))) { GizmoPlane obj = (GizmoPlane)ToLua.ToObject(L, 1); UnityEngine.Vector3[] arg0 = ToLua.CheckObjectArray <UnityEngine.Vector3>(L, 2); UnityEngine.Vector2[] arg1 = ToLua.CheckObjectArray <UnityEngine.Vector2>(L, 3); int[] arg2 = ToLua.CheckNumberArray <int>(L, 4); obj.Set(arg0, arg1, arg2); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: GizmoPlane.Set")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void SetSize(float size) { float ratio = cellSize.y / cellSize.x; // 控制8个点移动方向 _GizimoPlane.vertices[0].y = cellSize.y * size / 2; _GizimoPlane.vertices[1].y = cellSize.y * size / 2 - space * ratio; _GizimoPlane.vertices[2].x = cellSize.x * size / 2; _GizimoPlane.vertices[3].x = cellSize.x * size / 2 - space; _GizimoPlane.vertices[4].y = -cellSize.y * size / 2; _GizimoPlane.vertices[5].y = -cellSize.y * size / 2 + space * ratio; _GizimoPlane.vertices[6].x = -cellSize.x * size / 2; _GizimoPlane.vertices[7].x = -cellSize.x * size / 2 + space; _GizimoPlane.Set(); }