public override void OnItemClick(ItemButton item) { if (!transmutationMode) { wholeScreenInputBlocker.gameObject.SetActive(true); itemActionMenu.gameObject.SetActive(true); List <ItemAction> actions = item.item.actions; int i = 0; for (; i < actions.Count && i < itemActionMenu.childCount; ++i) { ItemActionButton button = itemActionMenu.GetChild(i).GetComponent <ItemActionButton>(); button.action = actions[i]; } for (; i < actions.Count; ++i) { ItemActionButton button = Instantiate(itemActionButtonPrefab); button.transform.SetParent(itemActionMenu); button.action = actions[i]; } for (; i < itemActionMenu.childCount; ++i) { itemActionMenu.GetChild(i).gameObject.SetActive(false); } StartCoroutine(RepositionMenu(itemActionMenu, item.transform as RectTransform)); } else { transmutationCallback(item.item); } }
private void Awake() { pickupable = GetComponent <Pickupable>(); storage = GetComponent <ItemStorage>(); flashlight = GetComponent <ItemLightControl>(); actionButton = GetComponent <ItemActionButton>(); }
private void Awake() { pickupable = GetComponent <Pickupable>(); spriteHandler = GetComponentInChildren <SpriteHandler>(); itemAttributesV2 = GetComponent <ItemAttributesV2>(); actionButton = GetComponent <ItemActionButton>(); pickupable.RefreshUISlotImage(); }
private void Awake() { lightControl = GetComponent <ItemLightControl>(); actionButton = GetComponent <ItemActionButton>(); }
private void Awake() { registerItem = GetComponent <RegisterItem>(); itemActionButton = GetComponent <ItemActionButton>(); spriteHandler = GetComponentInChildren <SpriteHandler>(); }
private void Awake() { actionButton = GetComponent <ItemActionButton>(); }
private void Awake() { pickupable = GetComponent <Pickupable>(); actionButton = GetComponent <ItemActionButton>(); }