Exemple #1
0
 public PullTogether(HardpointController point, AttachmentController attachment, HardpointController attachmentPoint)
 {
     Point              = point;
     Attachment         = attachment;
     AttachmentPoint    = attachmentPoint;
     AttachmentPullable = attachment.GetComponent <PullableController>();
 }
Exemple #2
0
    public virtual void PullAndAttach(HardpointController point, AttachmentController attachment, HardpointController attachmentPoint)
    {
        PullableController pullable = attachment.GetComponent <PullableController>();

        if (pullable == null)
        {
            Debug.Log("Cannot pull object that is not pullable.");
            return;
        }


        PullObjectsController puller = point.GetComponent <PullObjectsController>();

        if (puller == null)
        {
            //Debug.Log("Cannot pull and attach as there is no puller on the point.");
            Attach(point, attachment, attachmentPoint);
            DiscoverConnected();
            return;
        }
        puller.PullSpecific = pullable;

        PullingTogether.Add(new PullTogether(point, attachment, attachmentPoint));
    }