/// <summary>Changes the state of each effector to unactive.</summary> /// <remarks>Changes the state of each effector to unactive. The effect results in non animated bodyparts. /// </remarks> /// <param name="parents">indicates whether parents of the effectors have to be deactivated or not. /// </param> public virtual void deactivateEffectors(bool parents) { foreach (System.Collections.Generic.KeyValuePair <com.brashmonkey.spriter.objects.SpriterIKObject , com.brashmonkey.spriter.objects.SpriterAbstractObject> entry in this.ikMap.EntrySet()) { com.brashmonkey.spriter.objects.SpriterAbstractObject obj = entry.Value; if (entry.Value is com.brashmonkey.spriter.objects.SpriterBone) { obj = this.tempBones[entry.Value.getId()]; } else { obj = this.tempObjects[entry.Value.getId()]; } obj.tween = false; if (!parents) { continue; } com.brashmonkey.spriter.objects.SpriterBone par = (com.brashmonkey.spriter.objects.SpriterBone )entry.Value.getParent(); for (int j = 0; j < entry.Key.chainLength && par != null; j++) { this.tempBones[par.getId()].tween = false; par = (com.brashmonkey.spriter.objects.SpriterBone)par.getParent(); } } }
protected internal override void updateBone(com.brashmonkey.spriter.objects.SpriterBone bone) { base.updateBone(bone); bone.copyValuesTo(temp); com.brashmonkey.spriter.objects.SpriterAbstractObject parent = (bone.hasParent()) ? getRuntimeBones()[bone.getParent().getId()] : this.tempParent; com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, temp); temp.copyValuesTo(this.lastFrame.getBones()[temp.getId()]); }