PutItemAway() public method

public PutItemAway ( int SlotNo ) : bool
SlotNo int
return bool
Example #1
0
    /* public string GetObjectInHand()
     * {
     *   return ObjectInHand;
     * }*/

    /* public GameObject GetGameObjectInHand()
     * {
     *   if (ObjectInHand != null)
     *       {
     *       return ObjectInHand.gameObject;
     *   }
     *   else
     *   {
     *       return null;
     *   }
     *
     *   //if (ObjectInHand != "")
     *   //{
     *   //    return GameObject.Find(ObjectInHand);
     *   //}
     *   //else
     *   //{
     *   //    return null;
     *   }
     *
     * }*/

    /*  public ObjectInteraction GetObjIntInHand()
     * {
     *    if (ObjectInHand != "")
     *    {
     *        GameObject obj = GetGameObjectInHand();
     *        if (obj != null)
     *        {
     *            return obj.GetComponent<ObjectInteraction>();
     *        }
     *    }
     *    return null;
     * }*/

    //public void SetObjectInHand(GameObject obj)
    //{
    //	ObjectInHand=obj.name;
    //}

    /*  public void SetObjectInHand(string obj)
     * {
     *    ObjectInHand = obj;
     * }*/

    //public Container GetCurrentContainer()
    //{
    //    return GameObject.Find(currentContainer).GetComponent<Container>();
    //}

    //public GameObject GetGameObject(string name)
    //{
    //    return GameObject.Find(name);
    //}

    public void PutItemAwayEvent(short slotNo)
    {
        ObjectInteraction objInt = GetObjectIntAtSlot(slotNo);

        if (objInt != null)
        {
            objInt.PutItemAway(slotNo);
        }
    }
Example #2
0
    public void PutItemAwayEvent(short slotNo)
    {
        GameObject obj = GetGameObjectAtSlot(slotNo);

        if (obj != null)
        {
            ObjectInteraction objInt = obj.GetComponent <ObjectInteraction>();
            if (objInt != null)
            {
                objInt.PutItemAway(slotNo);
            }
        }
    }
    public void PutItemAwayEvent(short slotNo)
    {
        ObjectInteraction objInt = GetObjectIntAtSlot(slotNo);

        if (objInt != null)
        {
            //ObjectInteraction objInt = obj.GetComponent<ObjectInteraction>();
            // if (objInt != null)
            //{
            objInt.PutItemAway(slotNo);
            // }
        }
    }