public void Initialize(InventoryPower power, bool infinity){ associatedPower = power; nameLabel = transform.Find("PowerName").GetComponent<UILabel>(); quantityLabel = transform.Find("PowerQuantity").GetComponent<UILabel>(); nameLabel.text = associatedPower.name; infinitePowers = infinity; UpdateQuantity(); }
public void Initialize(Sprite sprite, InventoryPower power, int boardIndex){ keyLabel = GetComponentInChildren<UILabel>(); keyLabel.enabled = true; keyLabel.text = boardIndex.ToString(); ActivationKey = boardIndex.ToString(); associatedPower = power; powerIcon = GetComponent<UI2DSprite>(); powerIcon.sprite2D = sprite; if(boardIndex == 1) { activationButton = InputControlType.LeftBumper; } else { activationButton = InputControlType.RightBumper; } }