Beispiel #1
0
        public void DisplayItem(string itemNameToDisplay, int itemCountToDisplay, Direction direction)
        {
            var item = _itemList.GetItemUsingName(itemNameToDisplay);

            if (item && itemCountToDisplay > 0)
            {
                foreach (var node in _shieldsRoot.GetComponentsInChildren <ItemDisplayerShieldNode>())
                {
                    if (node.Rarity == item.Rarity)
                    {
                        node.Display(direction);
                    }
                    else
                    {
                        node.Hide();
                    }
                }
            }
            else
            {
                foreach (var node in _shieldsRoot.GetComponentsInChildren <ItemDisplayerShieldNode>())
                {
                    node.Hide();
                }
            }
        }
Beispiel #2
0
        // PUBLIC

        public void DisplayEmissive(string itemName)
        {
            var item = _itemList.GetItemUsingName(itemName);

            if (item)
            {
                Emissive.GetComponent <MeshRenderer>().material = item.EmissiveMaterial;
            }
        }