protected float TotalRopeLength() { Vector2[] temp = new Vector2[RotationPoints.Count]; RotationPoints.CopyTo(temp, 0); float total = GetLocalRotationPoint().Length(); for (int i = 0; i < RotationPoints.Count - 1; i++) { total += (temp[i] - temp[i + 1]).Length(); } return(total); }
static int CopyTo(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); System.Collections.Generic.Stack <FairyGUI.GComponent> obj = (System.Collections.Generic.Stack <FairyGUI.GComponent>)ToLua.CheckObject <System.Collections.Generic.Stack <FairyGUI.GComponent> >(L, 1); FairyGUI.GComponent[] arg0 = ToLua.CheckObjectArray <FairyGUI.GComponent>(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); obj.CopyTo(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }