Exemple #1
0
 public bool PickUpSlot(PortLocations location, Pickupable item)
 {
     if (!inv.ContainsKey(location))
     {
         return(Pickup(location, item));
     }
     return(false);
 }
Exemple #2
0
    //activeSlot?
    //PortLocations activeLocation;


    public bool DropSlot(PortLocations location)
    {
        if (inv.ContainsKey(location))
        {
            inv[location].Drop();
            inv.Remove(location);
            return(true);
        }
        return(false);
    }
Exemple #3
0
 public Transform PickUp(PortLocations loc)
 {
     if (!isPickedUp)
     {
         isPickedUp = true;
         m_Rigidbody.isKinematic = true;
         //SET COLLIDER FALSE;
         return(rootLocations[loc]);
     }
     return(null);
 }
Exemple #4
0
    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);
    }
Exemple #5
0
 public void AddLocation(PortLocations loc, Transform transform)
 {
     rootLocations.Add(loc, transform);
 }
Exemple #6
0
 private Vector3 getOffset(PortLocations loc)
 {
     return(this.transform.position - rootLocations[loc].position);
 }