public void RemoveAttachmentOfType(EAttachmentType type) { AttachmentBase attachment = null; if (currentAttachments.TryGetValue(type, out attachment)) { attachment.Remove(); EAttachmentTarget target = Attachments.AttachmentTarget(type); currentAttachments.Remove(type); attachmentTargetContents.Remove(target); SetupCollider(); } }
public void RemoveAttachmentFromTarget(EAttachmentTarget target) { AttachmentBase attachment = null; if (attachmentTargetContents.TryGetValue(target, out attachment)) { attachment.OnRemoveFromKoboto(this); attachment.Remove(); EAttachmentType type = attachment.attachmentType; currentAttachments.Remove(type); attachmentTargetContents.Remove(target); SetupCollider(); Debug.Log("Removeing attachment: " + type + " from " + target); } }