//todo: Character's current animation will be cloned and not have the same reference to the animation in the outfit. This should be fixed. #region IContract implementation public ICharacter ToItem(AGSSerializationContext context) { if (Obj == null) { return(null); } ICharacter item = context.Factory.Object.GetCharacter(Obj.ID, Outfit.ToItem(context), Obj.AnimationComponent.ToItem(context)); Obj.ToItem(context, item); item.WalkStep = WalkSpeed; item.AdjustWalkSpeedToScaleArea = AdjustWalkSpeedToScaleArea; item.DebugDrawWalkPath = DebugDrawWalkPath; item.Inventory = Inventory.ToItem(context); if (IsPlayer) { context.Player = item; } return(item); }