Exemplo n.º 1
0
        private void refresh_sell(bool resetIndex = false)
        {
            /* //Debug
             * Item_Data.Clear();
             * int count = actor.num_items;
             * for (int i = 0; i < count; i++)
             * {
             *  Item_Data.Add(new Shop_Sell_Item());
             *  Item_Data[i].set_image(actor, actor.items[i], -1, item_cost(i));
             *  Item_Data[i].loc = Window.loc + new Vector2(8, 28 + i * 16);
             * }*/

            if (resetIndex)
            {
                Window = null;
            }
            Window = new Window_Command_Shop(
                Window,
                new Vector2(Item_Rect.X - 8, Item_Rect.Y - 28),
                Item_Rect.Width + 16, ROWS,
                false, Actor_Id, Buy_Price_Mod,
                Enumerable.Range(0, actor.num_items)
                .Select(i => this.actor.items[i])
                .ToList());
            Window.active = Trading;
        }
Exemplo n.º 2
0
        private void refresh_buy(bool resetIndex = false)
        {
            /* //Debug
             * Item_Data.Clear();
             * for (int i = 0; i < Shop.items.Count; i++)
             * {
             *  Item_Data.Add(new Shop_Item());
             *  Item_Data[i].set_image(actor, new Item_Data(Shop.items[i].Type, Shop.items[i].Id), Shop.items[i].Uses, item_cost(i));
             *  Item_Data[i].loc = Window.loc + new Vector2(8, 28 + i * 16);
             * }*/

            if (resetIndex)
            {
                Window = null;
            }
            Window = new Window_Command_Shop(
                Window,
                new Vector2(Item_Rect.X - 8, Item_Rect.Y - 28),
                Item_Rect.Width + 16, ROWS,
                true, Actor_Id, Buy_Price_Mod, Shop.items);
            Window.active = Trading;
        }