public static void SetDrawOrderToSetupPose(this Skeleton skeleton) { Slot[] items = skeleton.slots.Items; int count = skeleton.slots.Count; ExposedList <Slot> drawOrder = skeleton.drawOrder; drawOrder.Clear(false); drawOrder.GrowIfNeeded(count); Array.Copy(items, drawOrder.Items, count); }
static int GrowIfNeeded(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Spine.ExposedList <Spine.Animation> obj = (Spine.ExposedList <Spine.Animation>)ToLua.CheckObject <Spine.ExposedList <Spine.Animation> >(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.GrowIfNeeded(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }