/// <summary> /// - Check whether the bone contains a specific bone or slot. /// </summary> /// <see cref="DragonBones.Bone"/> /// <see cref="DragonBones.Slot"/> /// <version>DragonBones 3.0</version> /// <language>en_US</language> /// <summary> /// - 检查该骨骼是否包含特定的骨骼或插槽。 /// </summary> /// <see cref="DragonBones.Bone"/> /// <see cref="DragonBones.Slot"/> /// <version>DragonBones 3.0</version> /// <language>zh_CN</language> public bool Contains(TransformObject value) { if (value == this) { return(false); } TransformObject ancestor = value; while (ancestor != this && ancestor != null) { ancestor = ancestor.parent; } return(ancestor == this); }
/** * 是否包含骨骼或插槽。 * @returns * @see dragonBones.TransformObject * @version DragonBones 3.0 * @language zh_CN */ public bool Contains(TransformObject child) { if (child == this) { return(false); } TransformObject ancestor = child; while (ancestor != this && ancestor != null) { ancestor = ancestor.parent; } return(ancestor == this); }
static int Contains(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); DragonBones.Bone obj = (DragonBones.Bone)ToLua.CheckObject(L, 1, typeof(DragonBones.Bone)); DragonBones.TransformObject arg0 = (DragonBones.TransformObject)ToLua.CheckObject(L, 2, typeof(DragonBones.TransformObject)); bool o = obj.Contains(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_origin(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); DragonBones.TransformObject obj = (DragonBones.TransformObject)o; DragonBones.Transform ret = obj.origin; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index origin on a nil value" : e.Message)); } }
static int get_name(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); DragonBones.TransformObject obj = (DragonBones.TransformObject)o; string ret = obj.name; LuaDLL.lua_pushstring(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index name on a nil value" : e.Message)); } }
static int set_userData(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); DragonBones.TransformObject obj = (DragonBones.TransformObject)o; object arg0 = ToLua.ToVarObject(L, 2); obj.userData = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index userData on a nil value" : e.Message)); } }
static int set_origin(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); DragonBones.TransformObject obj = (DragonBones.TransformObject)o; DragonBones.Transform arg0 = (DragonBones.Transform)ToLua.CheckObject(L, 2, typeof(DragonBones.Transform)); obj.origin = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index origin on a nil value" : e.Message)); } }
static int set_name(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); DragonBones.TransformObject obj = (DragonBones.TransformObject)o; string arg0 = ToLua.CheckString(L, 2); obj.name = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index name on a nil value" : e.Message)); } }