protected override void AssignToDropZone() { base.AssignToDropZone(); if (_currentDropZone != null) { DropZone_Outbox drawer = _currentDropZone.GetComponent <DropZone_Outbox>(); if (drawer != null) { if (commandInOutbox != null) { commandInOutbox(); } } } }
private IEnumerator PlaceObjectInOutbox(MovableObject obj) { if (_outbox == null) { _outbox = FindObjectOfType <DropZone_Outbox>(); if (_outbox == null) { yield return(null); } } obj.transform.position = _outbox.gameObject.transform.position; obj.Select(false); yield return(new WaitForFixedUpdate()); obj.Deselect(false); if (newObjectInOutbox != null) { newObjectInOutbox(); } }
private void AssignReferences() { _outbox = FindObjectOfType <DropZone_Outbox>(); _slidableDrawer = FindObjectOfType <SlidableDrawer>(); _drawers = FindObjectsOfType <DropZone_Drawer>(); }