public bool PickUpSlot(PortLocations location, Pickupable item) { if (!inv.ContainsKey(location)) { return(Pickup(location, item)); } return(false); }
//activeSlot? //PortLocations activeLocation; public bool DropSlot(PortLocations location) { if (inv.ContainsKey(location)) { inv[location].Drop(); inv.Remove(location); return(true); } return(false); }
public Transform PickUp(PortLocations loc) { if (!isPickedUp) { isPickedUp = true; m_Rigidbody.isKinematic = true; //SET COLLIDER FALSE; return(rootLocations[loc]); } return(null); }
private bool Pickup(PortLocations location, Pickupable item) { Transform portLoc = item.PickUp(location); if (portLoc != null) { inv.Add(location, item); item.transform.SetParent(InvSpace); return(true); } return(false); }
public void AddLocation(PortLocations loc, Transform transform) { rootLocations.Add(loc, transform); }
private Vector3 getOffset(PortLocations loc) { return(this.transform.position - rootLocations[loc].position); }