Spine.SkeletonData.FindBone C# (CSharp) Method

FindBone() public method

public FindBone ( String boneName ) : BoneData
boneName String
return BoneData
		public BoneData FindBone (String boneName) {
			if (boneName == null) throw new ArgumentNullException("boneName", "boneName cannot be null.");
			ExposedList<BoneData> bones = this.bones;
			for (int i = 0, n = bones.Count; i < n; i++) {
				BoneData bone = bones.Items[i];
				if (bone.name == boneName) return bone;
			}
			return null;
		}

Usage Example

Esempio n. 1
0
 static int FindBone(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Spine.SkeletonData obj  = (Spine.SkeletonData)ToLua.CheckObject <Spine.SkeletonData>(L, 1);
         string             arg0 = ToLua.CheckString(L, 2);
         Spine.BoneData     o    = obj.FindBone(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
All Usage Examples Of Spine.SkeletonData::FindBone