FindSlotIndex() публичный Метод

public FindSlotIndex ( String slotName ) : int
slotName String
Результат int
Пример #1
0
 static int FindSlotIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Spine.Skeleton obj  = (Spine.Skeleton)ToLua.CheckObject <Spine.Skeleton>(L, 1);
         string         arg0 = ToLua.CheckString(L, 2);
         int            o    = obj.FindSlotIndex(arg0);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
		public static PolygonCollider2D AddBoundingBoxGameObject (Skeleton skeleton, string skinName, string slotName, string attachmentName, Transform parent, bool isTrigger = true) {
			Skin skin = string.IsNullOrEmpty(skinName) ? skeleton.data.defaultSkin : skeleton.data.FindSkin(skinName);
			if (skin == null) {
				Debug.LogError("Skin " + skinName + " not found!");
				return null;
			}

			var attachment = skin.GetAttachment(skeleton.FindSlotIndex(slotName), attachmentName);
			if (attachment == null) {
				Debug.LogFormat("Attachment in slot '{0}' named '{1}' not found in skin '{2}'.", slotName, attachmentName, skin.name);
				return null;
			}

			var box = attachment as BoundingBoxAttachment;
			if (box != null) {
				var slot = skeleton.FindSlot(slotName);
				return AddBoundingBoxGameObject(box.Name, box, slot, parent, isTrigger);
			} else {
				Debug.LogFormat("Attachment '{0}' was not a Bounding Box.", attachmentName);
				return null;
			}
		}