예제 #1
0
        private void item_node(int unit_index, int index, List <CommandUINode> nodes)
        {
            Status_Item item = new Status_Item();

            TactileLibrary.Item_Data item_data = unit_index == 0 ?
                                                 actor1.whole_inventory[index] :
                                                 actor2.whole_inventory[index];
            item.set_image(unit_index == 0 ? actor1 : actor2, item_data);

            var node = new ItemUINode("", item, SPACING - 16); //Debug

            node.loc = new Vector2(8, 8) + new Vector2(SPACING * unit_index, index * 16);
            nodes.Add(node);
        }
예제 #2
0
        internal override void refresh(Game_Unit unit)
        {
            _enabled = false;
            if (ItemFormula != null)
            {
                var state = ItemFormula(unit);

                Item.set_image(unit.actor, state.Item);
                if (state.Drops)
                {
                    Item.change_text_color("Green");
                }
                EquippedTag.visible = state.Equipped;

                _enabled = !state.Item.non_equipment;
            }
        }
예제 #3
0
        protected virtual CommandUINode item(string str, int i)
        {
            var item_data = items(i);

            if (!is_valid_item(get_equipment(), i))
            {
                return(null);
            }

            var text = new Status_Item();

            text.set_image(actor(), item_data);
            var text_node = new ItemUINode("", text, this.column_width);

            text_node.loc = item_loc(i);
            return(text_node);
        }
        internal void refresh_items(List <SupplyItem> supplies, Game_Actor actor)
        {
            var items = new List <Status_Item>();

            for (int i = 0; i < supplies.Count; i++)
            {
                var item = new Status_Item();
                item.set_image(
                    actor, supplies[i].get_item());
            }
            if (items.Count == 0)
            {
                items.Add(new ConvoyItemNothing());
            }

            SupplyList  = supplies;
            ConvoyItems = items;

            set_items(null);

            refresh_face();
        }