Ejemplo n.º 1
0
 /// <summary>
 /// Entfernt ein ItemControl aus der Ansicht
 /// </summary>
 /// <param name="control"></param>
 protected virtual void HideControl(ItemControl control)
 {
     if (!control.IsHidden)
     {
         control.Hide();
     }
 }
Ejemplo n.º 2
0
    //This function equips the item graphically by sending it to the button icon
    //TODO have the equipped item reflect itself on the user's stats
    void EquipItem()
    {
        transform.GetChild(1).gameObject.SetActive(true);                                       //Set the level pic to active

        displayItem.Hide(selectedItem);
        Image[] panel = gameObject.GetComponentsInChildren <Image>();
        Image[] temp  = selectedItem.GetComponentsInChildren <Image>();
        panel[1].sprite = temp[1].sprite;
        panel[2].sprite = temp[2].sprite;
        equipped        = true;
    }