/// <internal/> /// <private/> internal void Init(ArmatureData armatureData, IArmatureProxy proxy, object display, DragonBones dragonBones) { if (this._armatureData != null) { return; } this._armatureData = armatureData; this._animation = BaseObject.BorrowObject <DrangonAnimation>(); this._proxy = proxy; this._display = display; this._dragonBones = dragonBones; this._proxy.DBInit(this); this._animation.Init(this); this._animation.animations = this._armatureData.animations; }
/// <private/> protected override void _OnClear() { if (this._clock != null) { // Remove clock first. this._clock.Remove(this); } foreach (var bone in this._bones) { bone.ReturnToPool(); } foreach (var slot in this._slots) { slot.ReturnToPool(); } foreach (var constraint in this._constraints) { constraint.ReturnToPool(); } if (this._animation != null) { this._animation.ReturnToPool(); } if (this._proxy != null) { this._proxy.DBClear(); } if (this._replaceTextureAtlasData != null) { this._replaceTextureAtlasData.ReturnToPool(); } this.inheritAnimation = true; this.userData = null; this._lockUpdate = false; this._slotsDirty = false; this._zOrderDirty = false; this._flipX = false; this._flipY = false; this._cacheFrameIndex = -1; this._bones.Clear(); this._slots.Clear(); this._constraints.Clear(); this._actions.Clear(); this._armatureData = null; // this._animation = null; // this._proxy = null; // this._display = null; this._replaceTextureAtlasData = null; this._replacedTexture = null; this._dragonBones = null; // this._clock = null; this._parent = null; }