Exemplo n.º 1
0
    public void TakeInfo(Item TheItem, int ThePlaceInInventroy, ItemHome TheHome)//When the item is created, it takes these paramets to determine its function and to determine where it is placed (inventory or shop, etc)
    {
        MyItem           = TheItem;
        MyImage          = transform.Find("ItemSpriteIcon").GetComponent <Image>();
        CounterText      = transform.Find("ItemCounter").GetComponent <Text>();
        CounterText.text = "";
        MyPlaceInHome    = ThePlaceInInventroy;
        MyHome           = TheHome;

        MyImage.sprite = TheItem.itemIcon;
    }
Exemplo n.º 2
0
    /// <summary>
    /// When the item is created, it takes these paramets to determine its function and to determine where it is placed (inventory or shop, etc)
    /// </summary>
    /// <param name="TheItem"></param>
    /// <param name="ThePlaceInInventroy"></param>
    /// <param name="TheHome"></param>
    public void TakeInfo(Item TheItem, int ThePlaceInInventroy, ItemHome TheHome)
    {
        MyItem           = TheItem;
        MyImage          = transform.Find("ItemSpriteIcon").GetComponent <Image>();
        CounterText      = transform.Find("ItemCounter").GetComponent <Text>();
        CounterText.text = "";
        MyPlaceInHome    = ThePlaceInInventroy;
        MyHome           = TheHome;

        MyImage.sprite = TheItem.itemIcon;
    }