Exemple #1
0
    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();
        }
    }
Exemple #2
0
    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);
        }
    }