예제 #1
0
 private void Update()
 {
     if (attachmentMount.HasAttachmentsOnIt() && !_hasMoved)
     {
         collider.transform.position = locationToMoveTo.position;
         _hasMoved = true;
     }
     else if (!attachmentMount.HasAttachmentsOnIt() && _hasMoved)
     {
         collider.transform.position = _initPos.position;
         _hasMoved = false;
     }
 }
예제 #2
0
 public void FixedUpdate()
 {
     if (AttachmentMount.HasAttachmentsOnIt() == true)
     {
         displayOnAttach.SetActive(true);
     }
     else
     {
         displayOnAttach.SetActive(false);
     }
 }
예제 #3
0
 public void Update()
 {
     if (attachmentMount.HasAttachmentsOnIt() && !_fired)
     {
         action.Invoke();
         _fired = true;
     }
     else
     {
         _fired = false;
     }
 }