Пример #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Random t_RandomNum = new Random();
            var    num         = t_RandomNum.Next(2, 3);

            num = 2;
            var t = ItemFactory.CreateItem(num);

            Console.WriteLine(num);
            PlayerBag.AddItem(t, 20);

            listBox1.Items.Clear();
            for (int i = 0; i < PlayerBag.GetKnapsackCount(); i++)
            {
                listBox1.Items.Add($"{PlayerBag.GetItem(i).inside_item_data.item_name} *{PlayerBag.GetItem(i).inside_item_quantity}");
            }
        }